-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Change Attach to Process to not require a program name by inferring it. #1272
Comments
On Linux, what I've experienced is that if the program doesn't match the process that is attached to, then the symbols and breakpoints won't be hit, so it's useless. I agree it seems odd why the field can't be auto-populated based on the PID ("process" is not needed when using the cppvsdbg debugger on Windows). Maybe @pieandcakes knows more. |
We send it to |
@pieandcakes I tested, and yes, you are right. Symbols aren't loaded if I set If I start gdb from command line with |
@chibicitiberiu We use gdb in If you add this block to your
|
+1 If the program name cannot be determined automatically please consider to provide an option like |
+1 The program path is already shown in the process list where you pick the process to attach. Shouldn't it be possible to just grab it from there? Maybe it needs a bit parsing to stop at the program arguments. |
@neumann-d I'll change this to a feature request |
+1 Is there any workaround using tasks/commands to somehow automate the program variable replacement? |
@batesj: "program": "/proc/${command:pickProcess}/exe",
"processId": "${command:pickProcess}" |
Currently, in order to attach to a process, I need to provide the following fields in my launch.json:
In my tests, it seems that the
program
field is validated (i.e. the executable exists, it is a valid executable), but it is completely ignored when debugging. I can set"program" = "/bin/bash"
and attach to any process I want. But if I set"program" = "non existent file"
, I get a launch error that the program doesn't exist.So why do I need to provide a path to the executable, when it is not needed?
Of course, it would be nice if
${command:pickProcess}
would use this field to filter the processes, but it doesn't. Even then, it should be optional.The text was updated successfully, but these errors were encountered: