Skip to content
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

Getting "null" and "Debug adapter process has terminated unexpectedly" when debugging #313

Closed
AngrySaltyFish opened this issue Oct 27, 2016 · 10 comments
Assignees
Labels

Comments

@AngrySaltyFish
Copy link

Hello,

I am currently having a issue where I am unable to run a executable compile with g++ and get the following errors:
deepinscreenshot20161027142809

My "launch.json":

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "C++ Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceRoot}/a.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceRoot}",
            "environment": [],
            "externalConsole": true,
            "linux": {
                "MIMode": "gdb"
            },
            "osx": {
                "MIMode": "lldb"
            },
            "windows": {
                "MIMode": "gdb"
            }
        },
        {
            "name": "C++ Attach",
            "type": "cppdbg",
            "request": "attach",
            "program": "${workspaceRoot}/a.out",
            "processId": "${command.pickProcess}",
            "linux": {
                "MIMode": "gdb"
            },
            "osx": {
                "MIMode": "lldb"
            },
            "windows": {
                "MIMode": "gdb"
            }
        }
    ]
}

gdb Seems to be working fine in a normal shell and i am currently running arch linux.

@pieandcakes
Copy link
Contributor

@Archangel7777777 Can you provide which version of OS you are using and what version of the extension?

@pieandcakes pieandcakes self-assigned this Oct 31, 2016
@AngrySaltyFish
Copy link
Author

@pieandcakes
Os version is 4.8.4-1-ARCH
extension version is 0.9.2

@pieandcakes
Copy link
Contributor

@Archangel7777777 Can you tell me what you are doing when it gives you the exception? Specifically some steps where I can reproduce this issue?

Also, can you enable trace and traceResponse and engineLogging in the launch.json and send me what you get when this error occurs?

Ex:
"logging": { "trace": true, "traceResponse": true, "engineLogging": true }

@AngrySaltyFish
Copy link
Author

@pieandcakes
Apologies for not giving much detail so far, i have bit busy recently so hopefully this makes up for it.

In terms steps to reproduce I don't really have any. Originaly I only had the Debug adapter process has terminated unexpectedly when running the launch config. After doing some googling i found #100 which said that after upgrading his system resolved the problem. After upgrading my system nothing changed so in desperate effort I uninstalled the visual-studio-code and installed visual-studio-code-git. Finally after installling the extentsion again I get null and Debug adapter process has terminated unexpectedly.

In terms of the logging I added what you suggest to the launch config and ran it. Nothing appeared the debug console (am I looking in the right place?).

I did try turning on developer tools and had a look in the console and found the following:
deepinscreenshot20161101164732

Not sure if any helps as I new to visual code studio so I have no idea of what I am doing let me know if you need anything else.

@pieandcakes
Copy link
Contributor

@Archangel7777777 Can you try reinstalling the extension? you can do that in the extension manager and search for the C++ extension and choose the uninstall option and then reinstall it again.

The logging I had you enable should show up in the Debugger Console. What that tells me is that there is something wrong with the installation.

The other item it might be is that it can't find gdb. you can add the tag "miDebuggerPath": "location/to/your/gdb" to your launch.json and see if that helps.

@AngrySaltyFish
Copy link
Author

@pieandcakes I managed to reinstall the extenstion. According to the debug console all dependicies were installed correctly and it was finised installing. After reloading I tried debugging but found that it hung and kept loading even after pressing the red stop button. Eventaully I exited vs code and found the same error as before when trying to debug.

@AngrySaltyFish
Copy link
Author

@pieandcakes I did also try using the tag suggested unfortunatly nothing changed!

@pieandcakes
Copy link
Contributor

@Archangel7777777 Can you see if you have mono.linux running? You can do ps aux | grep mono in a terminal window. it sounds like the first time you ran the debugger, you are saying that it "hung" ? can you provide more information or a screenshot?

@AngrySaltyFish
Copy link
Author

@pieandcakes Good news it's Fixed! It turns out there was a problem with mono.

After finding out that mono.linux was not running I thought it would be a good idea to check whether mono was working. After running monodevelop from the terminal I got System.InvalidTimeZoneException: TZ file too big for the buffer. This suggested a problem with the time zone so I ran the following commands to try and fix it:

rm /etc/localtime
ln -s /usr/share/zoneinfo/

After that monodevelop was up and running and vs code was debugging.

Thank you very much for your help even though it was not you problem in the end.

@pieandcakes
Copy link
Contributor

@Archangel7777777 Awesome! I'm glad this is fixed for you.

asialasr pushed a commit to asialasr/vscode-cpptools that referenced this issue Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants