techl / MonoRemoteDebugger

Other
83 stars 18 forks source link

Breakpoint #12

Closed Gianluca1986 closed 8 years ago

Gianluca1986 commented 8 years ago

Hi, is it possible to use the breakpoints outside the Main? I tried using a breakpoint in an event of a button, but it is completely ignored by visual studio. I use Visual Studio 2015.

techcap commented 8 years ago

Now it has a bug that breakpoints doesn't work in threads except main thread.

gizmoplex commented 8 years ago

Hello,

I'm unable to get a breakpoint to work even inside Main() for a simple "Hello World" style console application. For the breakpoint, the VS2015 IDE states "The breakpoint will not currently be hit. No symbols have been loaded for this document." When I debug the application local the breakpoint work as expected.

screenshot 2

techcap commented 8 years ago

@gizmoplex For me, it works properly. Could you check the mono version? I tested using mono v4.2.3.4 and MonoRemoteDebugger 1.0.7 and 1.0.8.

gizmoplex commented 8 years ago

@techcap It looks like I am running mono v3.2.8 on the remote system which is a Raspberry Pi running Raspbian Jessie which is based on Debian Jessie. v3.2.8 seems to be the current version for Debian/Raspbian Jessie, so now I am looking into how I can install a more recent version.

I also noticed that in VS2015, the MonoRemoteDebugger extension is reported as v1.0.5. I uninstalled the extension and re-installed from the VS gallery and then again from the 1.0.8 release on GitHub, but the version reported in VS2015 is still 1.0.5.

In order to use MonoRemoteDebugger, is there anything within VS2015 that I need to change to target the Mono framework as opposed to .NET? I'm using .NET so .pdb debug files are created locally. Do I perhaps need to compile with mono so that .mdb files are created?

Thanks!

gizmoplex commented 8 years ago

@techcap Update: I was able to update my remote machine to Mono v.4.2.3.4 and still have the same problem. On my Windows development machine where I'm running VS2015, the version is v4.2.3 (Visual Studio built mono).

On the remote machine where I am running MonoRemoteDebugger.Server.exe via SSH, the output is as follows:

$ mono MonoRemoteDebugger.Server.exe 2016-06-06 10:56:27.1615|TRACE|MonoRemoteDebugger.SharedLib.Server.MonoDebugServer|Start announcing 2016-06-06 10:56:27.2209|INFO|MonoRemoteDebugger.SharedLib.Server.MonoDebugServer|Waiting for client 2016-06-06 10:56:40.1370|INFO|MonoRemoteDebugger.SharedLib.Server.MonoDebugServer|Accepted client: 192.168.101.141:54050 2016-06-06 10:56:40.2423|TRACE|MonoRemoteDebugger.SharedLib.Server.ClientSession|New Session from 192.168.101.141 2016-06-06 10:56:40.8312|TRACE|MonoRemoteDebugger.SharedLib.Server.ClientSession|Receiving content from 192.168.101.141 2016-06-06 10:56:41.2794|TRACE|MonoRemoteDebugger.SharedLib.Server.ClientSession|Extracted content from 192.168.101.141 to /tmp/MonoRemoteDebugger/qzclk9p9.a2d 2016-06-06 10:56:41.3361|TRACE|MonoRemoteDebugger.SharedLib.Server.Pdb2MdbGenerator|/tmp/MonoRemoteDebugger/qzclk9p9.a2d 2016-06-06 10:56:41.3520|TRACE|MonoRemoteDebugger.SharedLib.Server.Pdb2MdbGenerator|1 2016-06-06 10:56:41.3739|TRACE|MonoRemoteDebugger.SharedLib.Server.Pdb2MdbGenerator|Generate mdp for: /tmp/MonoRemoteDebugger/qzclk9p9.a2d/RasPi Console Test.exe Mono pdb to mdb debug symbol store converter Usage: pdb2mdb assembly 2016-06-06 10:56:41.6232|TRACE|MonoRemoteDebugger.SharedLib.Server.Pdb2MdbGenerator|Transformed Debuginformation pdb2mdb This is a test forthe Raspberry Pi!

Press any key to exit.

Execution of the program on the remote system goes right past the breakpoint and runs to completion. I feel like there may be a step that I am missing, but I'm not sure what or where.

Thanks!

gizmoplex commented 8 years ago

@techcap Update: The problem appears to due to the fact that I have spaces in my VS2015 project name and resulting .exe file. I created new test VS2015 projects without spaces in the name and the breakpoints worked. It even worked for a GUI WinForms application using a remote X session. I then created a new test project containing a space in the name and was able to reproduce the problem.

When spaces are present in the project name, the problem occurs whether I use the "Debug with Mono (local)" or "Debug with Mono (remote)" option.

Now that I know the source of the problem, not using spaces in the project name will be an easy workaround for me.

Thanks!

techcap commented 8 years ago

@gizmoplex I fixed the bug in v1.0.9 which you said that if project name has spaces, it doesn't work. Thank you.

gizmoplex commented 8 years ago

@techcap I just downloaded and tested v1.0.9 and confirmed that it now works when the project name includes spaces. Thanks!

techcap commented 8 years ago

👍