4

I have this idea to use Visual Studio Code as a debugger of a working .NET Framework application.

Let's assume that there is a running process that runs a full .NET Framework 64-bit application. I have all the PDBs. Would it be possible to attach to that process Visual Studio Code debugger and debug that process?

For now, I have tried, with C# extension from OmniSharp launch.json:

{
    "version": "0.2.0",
    "configurations": [
         {
             "name": "Attach to process",
             "type":"clr",
             "request": "attach",
             "processName": "process_name"
         }]
 }

but it ends with:

Unable to start debugging. Failed to attach to process: Unknown Error: 0x8013132e

Anyone mayby tried to achieve the same? Is this even possible? Maybe there is some other plugin that I have skipped?

4
  • Does this answer your question? Visual Studio Code for .Net Framework Commented Nov 9, 2020 at 8:52
  • Unfortunately, it does not answer my question. Provided solutions require to build the .NET Framework application inside VS Code. I just want to attach to an already running process without rebuilding the .NET full Framework in VS Code. Commented Nov 9, 2020 at 9:17
  • 1
    0x8013132e is CORDBG_E_DEBUGGER_ALREADY_ATTACHED. Whether that's true or not is another matter, but it's a solid clue. Commented Nov 9, 2020 at 9:41
  • Thanks, that's a true statement. I was trying to attach the debugger in VS Code to a process that had already a debugger attached, but in (full) Visual Studio. Now the next step for me is to resolve: "WARNING: Could not load symbols for 'process_name.exe'. process_name.pdb' is a Windows PDB. These are not supported by the cross-platform .NET Core debugger." Of course, that exe was compiled with .pdb set as <DebugType>portable</DebugType> Commented Nov 9, 2020 at 11:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.