wpf - Break Points Only Working When Project Run From Certain Locations -


i have issue visual studio doesn't break @ of breakpoints message:

the breakpoint not hit. no symbols have been loaded document 

i have tried pretty relevant-looking solutions able find no success @ (including the answers here).

luckily, have version on .git working @ time of pushing it, tested cloning repository on various drives see happen:


c: (local) - run other projects , have never experienced issue. however, can't use breakpoints project.

y: (remote) - departmental drive, have done lot of debugging in past without issue. the break points worked here!

h: (remote) - personal network drive - break points did not work here.


i tried moving project folder around in drives, same results each

i lost , appreciate @ all! happy run more tests if can think of any.

it turns out being caused post-build action, ilmerge.bat:

cmd echo parameter=%1 cd %1 copy wpffiledeleter.exe temp.exe echo "..\..\ilmerge.exe" "..\..\ilmerge.exe" /out:"wpffiledeleter.exe" /targetplatform:"v4" "temp.exe" "microsoft.windowsapicodepack.dll" "microsoft.windowsapicodepack.extendedlinguisticservices.dll" "microsoft.windowsapicodepack.sensors.dll" "microsoft.windowsapicodepack.shell.dll" "microsoft.windowsapicodepack.shellextensions.dll" del temp.exe 

this action works fine, problem how access .sln

local drive

when building locally on c:, build-action successful, once binary has been merged required .dlls, break points no longer work .exe wont coincide existing .pdb (which unaffected ilmerge).

network drive accessed via \\\\

if navigate (in explorer) \\\file\test\, build action won't run because .bat files cannot operate on unc paths:

cmd not support unc paths current directories

when post-build action fails, debugging work correctly break points.

running mapped network drive

if navigate folder via y:\test post-build action work, because reads y: instead of \\. however, similar scenario in local drive, prevents me debugging properly.

this explains why worked on 1 (mapped) network drive, not other, , why not working on c: (because post-build action wouldn't allow debugged).


the solution run post-build action on release assemblies , not debug.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -