attach-to-process

VSCode debugger attach to local process

元气小坏坏 提交于 2020-12-08 05:32:05
问题 One of the great features of PyCharm is that it allows its debugger to attach to python processes running locally (and outside of the IDE). As I am trying to move to VSCode to work in Python, I am struggling to configure launch.json to simulate PyCharm's attach to local process feature. { "name": "Python: Attach", "type": "python", "request": "attach", "localRoot": "${workspaceFolder}", "remoteRoot": "${workspaceFolder}", "port": 8001, "secret": "my_secret", "host": "localhost" }, This

How to attach a process to the current debugger programmatically?

ε祈祈猫儿з 提交于 2020-08-11 04:04:07
问题 I have 2 projects in the solution that compile to A.exe and B.exe . A will start B and connect to it through a pipe. I want to test the connection between them so I'd like to attach to both at the same time. Doing that manually every time is very inconvenient so I tried this if(IsDebuggerPresent()) DebugActiveProcess(processId); However it seems B is attached to A's debugger instead of Visual Studio's debugger. So how can I attach B to VS debugger automatically? I have windbg at hand for

How to automatically attach process to a specific instance of VS?

我与影子孤独终老i 提交于 2020-01-05 12:56:58
问题 I am trying to attach a process to VS by using this code: DTE dte = (DTE)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.11.0"); EnvDTE.Processes pro = dte.Debugger.LocalProcesses; foreach (EnvDTE.Process p in pro) { if (p.ProcessID == num) { p.Attach(); return; } else { continue; } } My problem is that I can't control to which instance of VS it gets attach to. usually its the first VS window that I opened. How can I get a list of all the open VS instances? Thank you

how to debug javascript in nodejs on Windows when I'm not the caller of node.exe

半腔热情 提交于 2019-12-23 22:33:45
问题 I'm trying to debug nodejs script (on Windows). I found that I can stop execution / set a breakpoint withing the script by using the 'debugger;' statement. However this seems to work only if node.exe called as: node debug myscript.js Problem is I'm not the one who's calling node.exe, so I can't pass the debug argument. Actually node.exe is being called many times before myscript.js. And myscript.js is in turn being called from some other.js. Running myscript.js directly (outside other.js)

How can I tell which process I am debugging (attached to multiple processes)?

会有一股神秘感。 提交于 2019-12-21 17:38:12
问题 I'm debugging a windows service which has two running instances, by attaching to both instances. I am doing this because I know only one instance will hit my breakpoint, but I'd like to know which instance that is, so that I don't have to attach to both in future. Is there a way, when attached to multiple processes, that you can tell which one has hit a breakpoint? A trial-and-error solution would be to attach one at a time and see if the breakpoint is hit, or, stop one of the services

How can I tell which process I am debugging (attached to multiple processes)?

余生颓废 提交于 2019-12-21 17:33:58
问题 I'm debugging a windows service which has two running instances, by attaching to both instances. I am doing this because I know only one instance will hit my breakpoint, but I'd like to know which instance that is, so that I don't have to attach to both in future. Is there a way, when attached to multiple processes, that you can tell which one has hit a breakpoint? A trial-and-error solution would be to attach one at a time and see if the breakpoint is hit, or, stop one of the services

How can I tell which process I am debugging (attached to multiple processes)?

大兔子大兔子 提交于 2019-12-04 07:49:52
I'm debugging a windows service which has two running instances, by attaching to both instances. I am doing this because I know only one instance will hit my breakpoint, but I'd like to know which instance that is, so that I don't have to attach to both in future. Is there a way, when attached to multiple processes, that you can tell which one has hit a breakpoint? A trial-and-error solution would be to attach one at a time and see if the breakpoint is hit, or, stop one of the services (through services.msc) and see which process ID disappears - but neither solution seems scale-able to me. Is

Visual Studio remote debugger “invalid access to memory location” feature

天涯浪子 提交于 2019-12-03 08:04:28
问题 This is another attempt to resolve the problem stated here. Unfortunately the topic was closed without adequate resolution found, as apparently the original poster had issues with symbols, not with visual studio problem itself. Problem Statement: Visual Studio 2012 (and 2010 for the same matter) will stop attaching to remote process after a period of time with "invalid access to memory location". Restarting Visual Studio fixes the problem. I am currently on VS2012 update 3, but the issue also

Visual Studio 2012 Remote Debugging: Invalid access to memory location

你说的曾经没有我的故事 提交于 2019-12-03 04:45:53
问题 I followed the instructions in this link: http://msdn.microsoft.com/en-us/library/bt727f1t.aspx to install the remote debugger (2012) on my server where the application is running in hope to debug it remotely from my dev machine running visual studio 2012. I cannot even get as far as viewing the list of processes to attach to on the remote machine. I keep getting "Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named [name]. Invalid access to memory location". I have

Visual Studio remote debugger “invalid access to memory location” feature

為{幸葍}努か 提交于 2019-12-02 23:15:53
This is another attempt to resolve the problem stated here . Unfortunately the topic was closed without adequate resolution found, as apparently the original poster had issues with symbols, not with visual studio problem itself. Problem Statement: Visual Studio 2012 (and 2010 for the same matter) will stop attaching to remote process after a period of time with "invalid access to memory location". Restarting Visual Studio fixes the problem. I am currently on VS2012 update 3, but the issue also occured in RTM, and all intermediate updates. The referenced thread suggests patching operating