6

I'm trying to remote debug my application (C# windows application) according to Remote Debugging, I installed the Remote Tools on my remote machine, say it's RA, and I added permission for the machine I want to debug the application, say it's B.

I open VS in B, Click Debug->Attach to Process..., choose 'Remote =(no authenticated) in Transport, then click the Find button and I can find the machine RA. When I selected this machine and choose the application I'm going to debug, but when I attach it, there's a lot log messages showing that Cannot find or open the PDB file.

Since we need the pdb files to debug on our local machine, then how remote debugging find the pdb files? Or I didn't have it configured correctly on RA?

Sky
  • 7,343
  • 8
  • 31
  • 42
  • Why not copy the .pdb files along with the application to the remote location? – ubi Mar 02 '16 at 06:13
  • I do have the pdb files in the remote machine, I usually debug locally in the remote machine. Now I'm trying to debug in another machine, the remote machine is a virtual machine. – Sky Mar 02 '16 at 06:16

3 Answers3

1

Confirm yourself that you can access the pdb files, located on RA, from B. First step is to make a network share of the directory where the pdb's are located on RA. Second step is to open a windows explorer on B and navigate to that specific network share. For example: \\RA-MACHINE\PDB-DIR. Log in with the correct credentials (RA-DOMAIN\RA-USER, RA-PWD) and tell it to remember your credentials for subsequent logins. The pdb-files should show up in the windows explorer. Configure where the debugger looks for symbol files, as described [here] and remote debugging should work.

Vincent65535
  • 111
  • 1
  • 6
  • After having carried out a broad number of other suggested [solutions](https://stackoverflow.com/questions/18109575/symbol-file-not-loading-for-debugging-custom-project-in-visual-studio-2012/18126332)... of which none worked, I finally found this one that did the trick. However, I circumvented the direct n/w share & used the Admin drive share + full path to the pdb file location. Nevertheless, the question remains at large why the standard configuration fails that does not require pointing to the symbol file. – Porky Dec 20 '18 at 12:35
0

According to https://msdn.microsoft.com/library/x54fht41(v=vs.100).aspx

By default, the debugger loads symbol files from the location where your EXE is located. To use symbols from another directory or a symbol server, you must specify the locations to Visual Studio.

ubi
  • 4,041
  • 3
  • 33
  • 50
  • I added a remote folder as the symbol file location. But the breakpoint is still disabled. And the log message is changed, it says that `Loading disabled by Include/Exclude setting`. – Sky Mar 02 '16 at 07:09
0

If you use Azure pipelines with VS 2022 and your .pdb file is present in your web app, you have to publish manually in VS with a profile and then attach the debugger. I tried to get my pipeline to update the .pdb file but was unsuccessful. I never had this issue with VS 2019.

GH DevOps
  • 305
  • 1
  • 11