Not possible to debug ASP.NET MVC project

Bug #570979 reported by wader
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
monodevelop (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: monodevelop

It is not possible to set breakpoints when debugging a ASP.NET MVC project

Steps to reproduce:
1. Create a new ASP.NET MVC project solution
2. Press F5 to run in debug mode
3. Wait until test page loads in browser
4. Open HomeController.cs
5. Set breakpoint on line 16 "ViewData["Message"] = "Welcome to ASP.NET MVC on Mono!";"

Result:
Monodevelop exception dialog:
Mono.Debugger.TargetMemoryException: Cannot read 4 bytes from target memory at address 0xffffffff

Server stack trace:
  at Mono.Debugger.Backend.Inferior.read_buffer (TargetAddress address, Int32 size) [0x00047] in /build/buildd/mono-debugger-2.4.3/backend/Inferior.cs:884
  at Mono.Debugger.Backend.Inferior.ReadInteger (TargetAddress address) [0x0000c] in /build/buildd/mono-debugger-2.4.3/backend/Inferior.cs:919
  at Mono.Debugger.Backend.Inferior.ReadAddress (TargetAddress address) [0x00020] in /build/buildd/mono-debugger-2.4.3/backend/Inferior.cs:944
  at Mono.Debugger.Architectures.Architecture_I386.GetLMF (Mono.Debugger.Backend.ThreadServant thread, Mono.Debugger.TargetMemoryAccess memory, Mono.Debugger.TargetAddress& lmf_address) [0x000d0] in /build/buildd/mono-debugger-2.4.3/backend/arch/Architecture_I386.cs:544
  at Mono.Debugger.Backend.SingleSteppingEngine+<ManagedCallback>c__AnonStorey1E.<>m__23 (Mono.Debugger.Thread , System.Object ) [0x00135] in /build/buildd/mono-debugger-2.4.3/backend/SingleSteppingEngine.cs:2143
  at Mono.Debugger.Backend.SingleSteppingEngine+<Invoke>c__AnonStorey1D.<>m__22 (Mono.Debugger.Thread , System.Object ) [0x00000] in /build/buildd/mono-debugger-2.4.3/backend/SingleSteppingEngine.cs:2095
  at Mono.Debugger.Backend.SingleSteppingEngine.SendCommand (Mono.Debugger.TargetAccessDelegate target) [0x00022] in /build/buildd/mono-debugger-2.4.3/backend/SingleSteppingEngine.cs:676
  at Mono.Debugger.Backend.SingleSteppingEngine.Invoke (Mono.Debugger.TargetAccessDelegate func, System.Object data) [0x0001b] in /build/buildd/mono-debugger-2.4.3/backend/SingleSteppingEngine.cs:2094
  at Mono.Debugger.Backend.ThreadManager.engine_thread_main () [0x00154] in /build/buildd/mono-debugger-2.4.3/backend/ThreadManager.cs:359

Exception rethrown at [0]:

  at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00000]

If you start monodevelop from a terminal window you will see log warnings about missing .mdb files, xsp2.exe.mdb etc. I cant find these files anywhere, i have tried apt-file and the package content search web service. Should they exist?

Terminal log:
mattias@ubuntu:~$ monodevelop
WARNING: Cannot find Mozilla directory containing libgtkembedmoz.so. Some Addins may not be able to function. Please set MOZILLA_FIVE_HOME to your Mozilla directory.
WARNING [2010-04-28 00:04:31Z]: Inotify watch limit is too low (8192).
MonoDevelop will switch to managed file watching.
See http://monodevelop.com/Inotify_Watches_Limit for more info.
WARNING [2010-04-28 00:04:32Z]: Error creating composed icon gtk-execute___asm3__debug-overlay-22.png at size Button. Icon __asm3__debug-overlay-22.png is 20x20, expected 22x22.

## DebuggerServer started
MDB version: 2-4-4
Cannot read symbol file `/usr/lib/mono/gac/xsp2/2.4.3.0__0738eb9f132ed756/xsp2.exe.mdb': Could not find file "/usr/lib/mono/gac/xsp2/2.4.3.0__0738eb9f132ed756/xsp2.exe.mdb".
>> OnInitialized
<< OnInitialized
Cannot read symbol file `/usr/lib/mono/gac/Mono.WebServer2/0.2.0.0__0738eb9f132ed756/Mono.WebServer2.dll.mdb': Could not find file "/usr/lib/mono/gac/Mono.WebServer2/0.2.0.0__0738eb9f132ed756/Mono.WebServer2.dll.mdb".
Cannot read symbol file `/tmp/mattias-temp-aspnet-0/9367d7be/assembly/shadow/133f36d7/d20adf2c_c135e9fb_00000001/System.Web.Mvc.dll.mdb': Could not find file "/tmp/mattias-temp-aspnet-0/9367d7be/assembly/shadow/133f36d7/d20adf2c_c135e9fb_00000001/System.Web.Mvc.dll.mdb".
Server OnTargetEvent: TargetExited stopped:False data:0 queue:0 thread: running:True
Server OnTargetEvent: TargetExited stopped:False data:0 queue:0 thread: running:True
Server OnTargetEvent: TargetExited stopped:False data:0 queue:0 thread: running:True
Cannot read symbol file `/tmp/mattias-temp-aspnet-0/a5bd9b1/App_global.asax.26feca4f.dll.mdb': Could not find file "/tmp/mattias-temp-aspnet-0/a5bd9b1/App_global.asax.26feca4f.dll.mdb".
Cannot read symbol file `/tmp/mattias-temp-aspnet-0/a5bd9b1/App_Web_36f70ebb.dll.mdb': Could not find file "/tmp/mattias-temp-aspnet-0/a5bd9b1/App_Web_36f70ebb.dll.mdb".
Server OnTargetEvent: TargetExited stopped:False data:0 queue:0 thread: running:True
Server OnTargetEvent: TargetExited stopped:False data:0 queue:0 thread: running:True
Server OnTargetEvent: TargetExited stopped:False data:0 queue:0 thread: running:True
Server OnTargetEvent: TargetExited stopped:False data:0 queue:0 thread: running:True
Server OnTargetEvent: TargetExited stopped:False data:0 queue:0 thread: running:True
Server OnTargetEvent: TargetExited stopped:False data:0 queue:0 thread: running:True

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: monodevelop 2.2.1+dfsg-1ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-20.30-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-20-generic i686
Architecture: i386
Date: Wed Apr 28 00:11:45 2010
ExecutablePath: /usr/lib/monodevelop/bin/MonoDevelop.exe
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta i386 (20100318)
InterpreterPath: /usr/bin/mono
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.utf8
SourcePackage: monodevelop

Revision history for this message
wader (mattias-wadman) wrote :
Revision history for this message
wader (mattias-wadman) wrote :

monodevelop did not crash i used ubuntu-bug <pid-of-monodevelop>

Revision history for this message
wader (mattias-wadman) wrote :

Steps to make debugging work:

1. Download xsp source package
2. Run dpkg-buildpackage
3. Overwrite the package installed dll files with the ones found in debian/tmp/..
4. Copy mdb files in debian/tmp/.. so they are located with the corresponding over written dll-files
5. Try the reproduce steps, this time the breakpoint is set correctly
6. Reload in browser, program will stop in debugger as it should

Why does the packaging system not include the mdb-files, should they be ignored? if not, how does one change the packaging files to include them?
If this is the case I guess that more mono package has this problem

Revision history for this message
wader (mattias-wadman) wrote :

Should the mdb files for the system libraries really be needed to be able to set breakpoints in application code? or is this some bug when some mdb files are missing?

Revision history for this message
buzzlightyear (lp-dewet) wrote :

I get the same error, only on a normal ASP.Net application when trying to a simple debug ASP.NET page.

Steps to reproduce:
1) Startup project with ASP.Net debugging without any breakpoints defined
2) Switch back to monodevelop and try to set a breakpoint on a line of code
Result: error message:

Mono.Debugger.TargetMemoryException: Cannot read 4 bytes from target memory at address 0xffffffff

Server stack trace:
  at Mono.Debugger.Backend.Inferior.read_buffer (TargetAddress address, Int32 size) [0x00047] in /build/buildd/mono-debugger-2.4.3/backend/Inferior.cs:884
  at Mono.Debugger.Backend.Inferior.ReadInteger (TargetAddress address) [0x0000c] in /build/buildd/mono-debugger-2.4.3/backend/Inferior.cs:919
  at Mono.Debugger.Backend.Inferior.ReadAddress (TargetAddress address) [0x00020] in /build/buildd/mono-debugger-2.4.3/backend/Inferior.cs:944
  at Mono.Debugger.Architectures.Architecture_I386.GetLMF (Mono.Debugger.Backend.ThreadServant thread, Mono.Debugger.TargetMemoryAccess memory, Mono.Debugger.TargetAddress& lmf_address) [0x000d0] in /build/buildd/mono-debugger-2.4.3/backend/arch/Architecture_I386.cs:544
  at Mono.Debugger.Backend.SingleSteppingEngine+<ManagedCallback>c__AnonStorey1E.<>m__23 (Mono.Debugger.Thread , System.Object ) [0x00135] in /build/buildd/mono-debugger-2.4.3/backend/SingleSteppingEngine.cs:2143
  at Mono.Debugger.Backend.SingleSteppingEngine+<Invoke>c__AnonStorey1D.<>m__22 (Mono.Debugger.Thread , System.Object ) [0x00000] in /build/buildd/mono-debugger-2.4.3/backend/SingleSteppingEngine.cs:2095
  at Mono.Debugger.Backend.SingleSteppingEngine.SendCommand (Mono.Debugger.TargetAccessDelegate target) [0x00022] in /build/buildd/mono-debugger-2.4.3/backend/SingleSteppingEngine.cs:676
  at Mono.Debugger.Backend.SingleSteppingEngine.Invoke (Mono.Debugger.TargetAccessDelegate func, System.Object data) [0x0001b] in /build/buildd/mono-debugger-2.4.3/backend/SingleSteppingEngine.cs:2094
  at Mono.Debugger.Backend.ThreadManager.engine_thread_main () [0x00154] in /build/buildd/mono-debugger-2.4.3/backend/ThreadManager.cs:359

Exception rethrown at [0]:

  at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x00000]

I'm running Lucid Lynx with all the latest software as installed via the ubuntu repositories.
monodevelop 2.2.1

Revision history for this message
buzzlightyear (lp-dewet) wrote :

I can also confirm that Matthias's steps to solve the problem works.

Revision history for this message
buzzlightyear (lp-dewet) wrote :

Actually, after only one successful debug session, it stopped working. I then looked around further, and found badgerports.

I've just upgraded all the mono packages to the latest ones offered by badgerports, and debugging ASP.Net now seems to work properly. http://badgerports.org/

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in monodevelop (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.