microsoft / vscode-makefile-tools

MAKE integration in Visual Studio Code
Other
194 stars 58 forks source link

Unable to start debugging. #414

Closed Okeeff closed 1 year ago

Okeeff commented 1 year ago

Type: Debugger ERROR: Unable to start debugging. Unexpected GDB output from command "-enironment-cd". Cannot access memory at address 0x800ff20

Describe the bug: I decided to learn C++. Installed everything that is needed, and it gives me an error

OS and Version: Windows 10 VS Code Version: 1.72.2 C/C++ Extension Version: 1.13.3 Other extensions you installed (and if the issue persists after disabling them): ----

Any suggestion with regards to this would be truly appreciated.

andreeis commented 1 year ago

@Okeeff, did you want to report a problem or fix it in our code base? Is this an accidental pull request? You can open a bug report under Issues if you'd like us to investigate something.

By reading what you wrote in the single file that you added, you mention windows but gdb. Are you in WSL or MinGW environment? Are you debugging with F5 or with the debug button from the C/C++ UI panel on the left side of VSCode (which is the same as the "Makefile: Debug the selected binary target" command from the commands palette)?

Set "makefile.loggingLevel": "Debug" in your ".vscode/settings.json", then try to debug again and share with us what you see in the "Makefile Tools" output channel. Also, did you select already a binary target to debug or you didn't? We shouldn't have that error regardless, just specify if you manually clicked the "Launch Target" control in the "C/C++" left UI panel or if it is marked as "Unset".

Okeeff commented 1 year ago

@Okeeff, did you want to report a problem or fix it in our code base? Is this an accidental pull request? You can open a bug report under Issues if you'd like us to investigate something.

By reading what you wrote in the single file that you added, you mention windows but gdb. Are you in WSL or MinGW environment? Are you debugging with F5 or with the debug button from the C/C++ UI panel on the left side of VSCode (which is the same as the "Makefile: Debug the selected binary target" command from the commands palette)?

Set "makefile.loggingLevel": "Debug" in your ".vscode/settings.json", then try to debug again and share with us what you see in the "Makefile Tools" output channel. Also, did you select already a binary target to debug or you didn't? We shouldn't have that error regardless, just specify if you manually clicked the "Launch Target" control in the "C/C++" left UI panel or if it is marked as "Unset".

There is nothing in the problem section, just throws this error. I would like to fix it myself. The debug console says The program 'c:\Users\lihan\OneDrive\Desktop\code\hello.exe' has exited with code 42 (0x0000002a). I am working in MinGW environment. I tried both F5 and another, but it still throws an error

andreeis commented 1 year ago

Does "hello.exe" run fine (0 exit code) otherwise, when not debugging it? Ideally you want to create a new issue, we discuss the symptoms of the problem there, the investigation that is done and if you'd like to fix yourself (thank you! very much appreciated and we can help when needed) then you create a PR (or in this case you can use this one) and the fixes are usually in the typescript files. The new file that you added doesn't make sense to be merged in with the code base.