0

I'm using a load simulation performance tool which uses user scripts in .NET 4.5.
The tool creates a Visual Studio Solution (VS2012 express). I would like to debug the the scripts using breakpoints but I can't because when executing the testing tool, the solution is compiled and the DLL files are copied to a location outside the solution directory tree.

for exemple:

The workspace created by the load simulation tool is located at:

c:\Load Projects\myProject

The visual studio solution is saved within it's directory tree:

c:\Load Projects\myProject\repository\VSSolution

But when I start the load simulation, the VS solution is compiled and the content copied to a temporary directory:

c:\loadCache\myProject

Is there a way of debugging a DLL which is located outside the VS solution; to give VS the location of the DLL to debug?

Helio Santos
  • 6,606
  • 3
  • 25
  • 31
  • Are you forgetting to copy the PDB files as well? Use the Debug + Windows + Modules window to get info. You can right-click the DLL and choose "Symbol load information" to find out where the debugger looked for symbols. – Hans Passant Jul 29 '14 at 12:47

2 Answers2

1

Make sure in the script projects that you set the build properties to produce debug info (pdb files). You may need to set this on both Debug and Release builds. Make sure the pdb files are copied to temporary directory, along with the dlls built at the same time. The pdbs contain the location of the source code used to create them.

When you start the simulation, you need to attach the Visual Studio debugger to the simulator process that is executing your scripts (see http://msdn.microsoft.com/en-us/library/3s68z0b3(v=vs.110).aspx). (You may need to set the "Attach to" to Managed code). This should enable you to debug the scripts.

Polyfun
  • 9,479
  • 4
  • 31
  • 39
0

If you have access to the project then what you normally do is change in VS reference from .dll to that project. enter image description here

If you do not then there is no out of the box solution, but there are few workarounds all of which do involve using external tools.
One would be to use Resharper. It allows you to debug 3rd party dlls..
Other would be to use .NET Reflector I think one can find version 6 for free.

Other than that you are out of luck.

Community
  • 1
  • 1
Matas Vaitkevicius
  • 58,075
  • 31
  • 238
  • 265