Skip to content

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

Closed
@GRoma44

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

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