macOS M1 芯片 IDEA Debug Rust 无法运行问题
Rust Debug macOS 大约 4947 字问题一
无法attach
,权限问题。
process exited with status -1 (attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.))
问题一解决方法
在Edit Configurations
中编辑设置,勾选Run with root privileges
,以root
权限执行即可解决上诉报错。
问题二
开发模式未启用。
process exited with status -1 (developer mode is not enabled on this machine and this is a non-interactive debug session.)
问题二决方法
使用命令行,执行以下命令,开启开发模式。
sudo DevToolsSecurity -enable
输出
❯ sudo DevToolsSecurity -enable
Developer mode is now enabled.
问题三(未解决)
无法获取debug
进程权限。
process exited with status -1 (this is a non-interactive debug session, cannot get permission to debug processes.)
错误日志
idea.log
中查看trace
级别信息。
2023-02-24 12:09:18,287 [ 112522] FINE - #c.j.c.e.debugger - [protobuf client 1] 5430 res:launch {
common_response {
is_valid: false
error_message: "process exited with status -1 (this is a non-interactive debug session, cannot get permission to debug processes.)"
}
}
2023-02-24 12:09:18,287 [ 112522] FINE - #c.j.c.e.debugger -
com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriverException: process exited with status -1 (this is a non-interactive debug session, cannot get permission to debug processes.)
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver$ThrowIfNotValid.throwError(LLDBDriver.java:307)
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver$ResponseMessageConsumer.throwIfNeeded(LLDBDriver.java:272)
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver$ThrowIfNotValid.throwIfNeeded(LLDBDriver.java:302)
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver.doLaunch(LLDBDriver.java:925)
at com.jetbrains.cidr.execution.debugger.backend.lldb.LLDBDriver$6.startImpl(LLDBDriver.java:520)
at com.jetbrains.cidr.execution.debugger.backend.DebuggerDriver$Inferior.start(DebuggerDriver.java:933)
at com.jetbrains.cidr.execution.debugger.CidrDebugProcess.doStartTarget(CidrDebugProcess.java:714)
at com.jetbrains.cidr.execution.debugger.CidrDebugProcess.lambda$sessionInitialized$4(CidrDebugProcess.java:707)
at com.jetbrains.cidr.execution.debugger.CidrDebugProcess$VoidDebuggerCommand.call(CidrDebugProcess.java:1152)
at com.jetbrains.cidr.execution.debugger.CidrDebugProcess$VoidDebuggerCommand.call(CidrDebugProcess.java:1146)
at com.jetbrains.cidr.execution.debugger.CidrDebuggerCommandExecutor$executeCommand$3.invokeSuspend(CidrDebuggerCommandExecutor.kt:89)
at com.jetbrains.cidr.execution.debugger.CidrDebuggerCommandExecutor$executeCommand$3.invoke(CidrDebuggerCommandExecutor.kt)
at com.jetbrains.cidr.execution.debugger.CidrDebuggerCommandExecutor$executeCommand$3.invoke(CidrDebuggerCommandExecutor.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.jetbrains.cidr.execution.debugger.CidrDebuggerCommandExecutor.executeCommand(CidrDebuggerCommandExecutor.kt:81)
at com.jetbrains.cidr.execution.debugger.CidrDebuggerCommandExecutor$executeCommandAsync$1.invokeSuspend(CidrDebuggerCommandExecutor.kt:61)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:243)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:216)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:205)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
如何查看 IDEA 系统日志
步骤一
双击Shift
,输入:
Debug Log Settings
弹出对话框,输入:
#com.jetbrains.cidr.execution.debugger:trace
步骤二
再次运行Debug
。
步骤三
在Finder
中打开IDEA
日志目录。
双击Shift
,输入:
Show Log in Finder
步骤四
查看idea.log
。
相关 issue
阅读 103 · 发布于 2023-05-08
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
Java 进程间通讯的几种方式阅读 2220
-
Windows WSL 能 ping 通但 curl 无响应阅读 2021
-
使用 jsDelivr 解决 GitHub 资源下载慢的问题阅读 606
-
Android ScrollView 不在最顶部问题阅读 2756
-
JMeter 使用 Response Assertion 判断接口请求是否成功阅读 1759
-
Go 中的指数符号 e阅读 2699
-
Java 代码表示 UML 依赖/泛化/实现/关联/聚合/组合关系阅读 3993
-
MyBatis ${} 和 #{} 区别阅读 422
-
Arthas 获取 Spring Context 动态修改 Spring Boot 配置文件中的值阅读 5257
-
Redis 实现统计在线人数、每日签到功能阅读 5065