raix / vscode-perl-debug

LOOKING FOR MAINTAINERS. Perl debugger extension for visual studio code
MIT License
63 stars 36 forks source link

remote debugger is already connected issue #148

Open dtibi opened 4 years ago

dtibi commented 4 years ago

When I debug remotely it seems to work fine unless I hit Continue (F5) to run until the breakpoint. I will get this error.

Remote debugger already connected!
DUMP: 0.0.0.0:5243 serving 127.0.0.1:50185
Warning: Additional remote client tried to connect "127.0.0.1:50919".
Error

it seems to get into some kind of Error but does not really talk about it too much. Is there a way to get more information on this Error? my config looks like this:

{
            "type": "perl",
            "request": "launch",
            "name": "Perl-Debug remote",
            "console": "remote",
            "port": 5243,
            "program": "${file}",
            "exec": "perl5.26.1",
            "execArgs": [],
            "root": "${workspaceRoot}/",
            "inc": [],
            "args": [],
            "env": {                
            },
            "stopOnEntry": true
}
dseynhae commented 3 years ago

I think that the default setting for sessions is set to single. If any other program tries to hook up to the debugger server, than the server will error out indeed.

By specifying sessions as break, you will allow more than one client, and the debugger will break upon running this new client. If you don't want to break, but just continue running the new client, then just set sessions to watch.

From my configuration file (extracted from my workspace settings file):

            {
                "type": "perl",
                "request": "launch",
                "name": "Perl-Debug remote",
                "console": "remote",
                "root": "${workspaceFolder:regtest}/hld/sycl/designs/",
                "stopOnEntry": true,
                "port": 5000,
                "sessions": "break"
            }