5

We currently have our builds running through Azure DevOps. For our dev branch we are building the application in debug mode. We can establish a connection to the machine remotely; however, when attaching the process we never get the breakpoints to turn read. Remote debugging for us works if we publish then debug; however, this is not what is wanted. We want the ability to debug from an already existing build. How do we do this?

Demodave
  • 6,242
  • 6
  • 43
  • 58
  • 1
    Where are the symbols and source for the Azure DevOp build? The most common reason for breakpoints not binding is that the source you have open in VS don't match what's being debugged. For example your local repo might be several commits ahead of the CI build etc. – Andy Sterland Mar 01 '19 at 00:27
  • What happens when you change the breakpoint to Allow the source code to be different from the original? (Of course this doesn't fix code differences). – Bernard Vander Beken Mar 05 '19 at 12:38
  • The normal remote debugging scenario is to have the executable on the remote machine and PDB files and source on the local machine. Surely you'll at least have trouble with the PDBs. [Look here](https://stackoverflow.com/a/2155997/17034) for diagnostics. – Hans Passant Mar 05 '19 at 14:05

2 Answers2

1

Consider to use the Index Sources & Publish Symbols build task. Here is a detailed instruction: Debugging deployed Azure Web Apps with VSTS Symbol Server

Shamrai Aleksander
  • 13,096
  • 3
  • 24
  • 31
0

As Andy mentioned it's hard to debug old deployment with latest code. When we build project, PDB files are generated for that specific version of code. PDB files contain symbols, identifiers and statement details and if there is modification in code, latest PDBs will differ from previous version of PDBs.

https://learn.microsoft.com/en-us/visualstudio/debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger?view=vs-2017

Bernard Vander Beken
  • 4,848
  • 5
  • 54
  • 76
Hemant Sakta
  • 615
  • 7
  • 8