Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Read PidNew to Visual Studio Code? Get it now.
Read Pid

Read Pid

visoks

|
502 installs
| (0) | Free
uses pidof command and returns pid value by using command:ReadPid
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Reads program PID on debug (when attaching) add to settings.json:

"ReadPid.AppName" : "your app name",

to launch.json:

{ 
	"name": "(gdb) Attach",
	"type": "cppdbg",
	"request": "attach",
	"program": "${workspaceFolder}/yourexe",
	"processId": "${command:ReadPid}",
	"MIMode": "gdb",
	"setupCommands": [
		{
			"description": "Enable pretty-printing for gdb",
			"text": "-enable-pretty-printing",
			"ignoreFailures": true
		}
	]
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft