Skip to content

Remote debug (ssh) Fails to attach and debug any processes #234

Closed

Description

@GRoma44

Issue Type: Bug

Using:-
Visual Studio Code 1.47.1
Native Debug 0.25.0
CentOS Linux release 7.7.1908

gdb attaches to a Linux process OK and the symbols are loaded but then an error is reported... "Could not continue: The program is not being run. (from exec-continue)
Also on the CALL STACK tab there is an error PAUSED ON EXCEPTION. The process does not have a bug and runs without any issues outside of the debugger. My debug launch settings are:

{
	...
			"type": "gdb",
			"request": "attach",
			"name": "Attach to PID",
                        "target": "5327",
			"cwd": "/home/xxxx/bin",
			"valuesFormatting": "parseText",
			"ssh": {
				"host": "xx.xxxx.xx",
				"cwd": "/home/xxxxx",
				"user": "xxxxx",

			},
		}

	]
}

Thanks WebFreak001 for the suggestion, the following extra details were generated, the most significant looks like
"Not implemented stop reason (assuming exception): undefined":-

GDB -> App: {"outOfBandRecord":[{"isStream":true,"type":"console","content":"Loaded symbols for /lib64/libfreebl3.so\n"}]}
Loaded symbols for /lib64/libfreebl3.so
GDB -> App: {"outOfBandRecord":[{"isStream":false,"type":"exec","asyncClass":"stopped","output":[["frame",[["addr","0x00007f8e2f7ee087"],["func","semop"],["args",[]],["from","/lib64/libc.so.6"]]],["thread-id","1"],["stopped-threads","all"],["core","0"]]}]}
Not implemented stop reason (assuming exception): undefined
5-thread-info

Replaced the hard coded process id in the target attribute with:-

  "target": "${command:PickProcess}",

but this generated :- PickProcess not found

Activity

  1. WebFreak001 commented on Jul 20, 2020

    @WebFreak001
    Owner

    Try enabling debug output ("showDevDebugOutput": true, "printCalls": true) and check the logs inside the debug console

  2. linked a pull request that will close this issuehonor debugger args for connect + attach #316on May 10, 2022
  3. GitMensch commented on May 10, 2022

    @GitMensch
    Collaborator

    This exception should have been gone in one of the previous releases. You possibly want to add sourceFileMap entries if the code does not reside on the same place on your machine/ssh one. To actually stop somewhere you'd want to set a breakpoint in the IDE and/or configure stopAtEntry.
    Therefore I'm closing this - but if you still see this issue: please report and we reopen.

    Side note: There is no general available "pick process", so for now either use a hardcoded value, or (commonly more reasonable) an input parameter - which then possibly provides you with a list, too. My personal workaround: I've created a tasks that list all processes I'm potentially interested in (limited to my user and some project specific options), which I run before debugging to get the PID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions