How do I debug using MVC in VS 2013? - debugging

I have an MVC5/EF app that I can't seem to debug at all. I have a console app also in the project that I can debug just fine, but when I set a breakpoint in a controller it won't debug. I've googled this but can't find anything that can help.

MVC 5 and EF most certainly works in debug. It even debugs jquery. So you must have something not right.
I would check all the projects build debug settings. Make sure build mode is debug.
Add some breakpoints early on to see if they are getting called.

Difficult to pin point the exact problem considering we can’t see your project’s solution.
But for the record, you mention that you have both an ASP.NET MVC application AND a Console application living within the same project.
Since you’re also saying that you can debug the console application, could it be that the Console application is the one that is Set as StartUp project and NOT the MVC application?
If that’s not the case, can you tell us which of your projects is Set as StartUp Project?

Related

How to I solve a Visual Studio Fatal Error during debugging involving Desktop CLR, CoreCLR and recommending Managed Debugger

I'm afraid the error is so baffling to me I didn't even know how to word the question! I'm writing a plugin that's a class library for a Third Party Application (call it 'ApplicationX'). I had this successfully set up in a debug environment where it would build to ApplicationX's Plugin folder with the .pdb file and then the VS debug would start ApplicationX, thus enabling me to debug the plugin/class library code. This was working fine until I had a System Drive crash >.< (my first ever + ouch!).
Here's the debug setup:
I've just come back to it. I couldn't tell you all the changes, but I'm on VS2022 now as opposed to 2019. Now when I run it (the source code and ApplicationX is still much the same), I get this really weird error:
I've read through all the SO articles I could find and tried the suggesitons therein, but nothings worked. Firstly, I just can't understand the error. Secondly, Are there any suggestions on what to do. Here's what I've tried:
Installing .net Core 3.1 and 6 (full + desktop versions)
In options>debugging>general, checked "automatically close the console when debugging stops"
Some other stuff that I can't remember right now!
Be grateful of any help as this has brought my dev to a grinding halt!
Solution: I got in touch with the author of 'ApplicationX' He confirmed that he'd migrated it to .net Core. So that was the issue. I haven't got the solution in terms of solving it from that perspective, as I switched to the .net Framework version of ApplicationX instead! Non-the-less, the error's a bit clearer.

Run New Relic in Xamarin Android application

I am trying to figure out how to run NewRelic mobile on xamarin forms android application. I found this repository. It is pretty old, but i tried o put latest .jar file and native library builds just fine. After i connect compiled dll to client project, i cant find a way to initialize newrelic, b/c there is no NewRelicHelper class, though it was declared in binidng metadata. Can you help and tell me how to find class that i need and initialize newrelic? Here is repo where you can reproduce issue.
I got it at least a step further, but it is still not working 100%
If you right click the csproj in visual studio and go to properties, in the Application Tab change the Android Class Parser to "class-parse" and the NewRelicHelper will now be in the dll, but the withApplicationToken method is not there.

How to use NetBeans debugger with JRebel

I recently installed the JRebel plugin for NetBeans and have noticed the following problem when debugging within the IDE:
If I set a breakpoint in a class and change the code afterwards, then my debugger doesn't always hit the breakpoint. I found a workaround: resetting the breakpoint (or reattaching the debugger to project) after reloading the class.
But this solution is not perfect because class is reloaded when app needs it for the first time(debugger doesn't work yet) so I have to make some action which I want to debug two times which can cause so many problems.
Another thing is what I can't explain at all.. even when I hit the breakpoint with success, I can't hit another one in another class.
Maybe someone has figured this issue out - ? Is there a way to reload changed classes on save?
NetBeans 7.2.1 with JRebel plugin, Glassfish 3.1.2
This is a known issue. The solution exists but not released yet.
Also, please check Options->Java->Java Debugger. Is the "Apply code changes after save" checkbox enabled? If not, could you enable it and try in this configuration - will it make any difference?

All MVC3 App failing at runtime for same reason

I am starting to learn MVC(3) following a tutorial. I am a developer so I know basics and I cannot find an answer on the web that is relavent enough to fix my issue.
All the MVC apps are the default start up code. I select an "internet application" and choose to user HTML5. F6, build works. Rebuild works. F5, debugging is a different story.
Compiler Error Message: CS1541: Invalid reference option: 'C:\Users\Other\AppData\Local\Temp\Temporary ASP.NET Files\root\f20fc565\816eddc7\App_global.asax.lsdrp-bk.dll' -- cannot reference directories
I have searched my disc and no "App_global.asax.lsdrp-bk.dll" exists at all. Please help!
Shut down all of your visual studio web servers running in your system tray.
Delete everything from:
C:\Users\Other\AppData\Local\Temp\Temporary ASP.NET Files\
That's your first step.That's a good starting point.
The error shows up as:
http://msdn.microsoft.com/en-us/library/2zyc8wkc(v=vs.90).aspx
where it thinks App_global.asax.lsdrp-bk.dll is a folder for some strange reason.
Also if you reference any other projects in your solution, re-add those references.

Add Web Service Reference Weird Problem in WP7

I have a WP7 project in VS2010 pro/ultimate and I have added a web reference from another project on the same solution. The web service project is just a normal website project, I just created .ASMX file. I tested the service using web browser and it works fine.
The problem is, after I added this service as service reference, I cannot reference it in my WP7 project and I can't view it in Object Browser either as if it doesn't exist.
I use local URL like 'http://localhost:12345/WebService.asmx' when I added the service, VS can see all the methods and can add successfully. Very strange for me and I don't know how to solve this issue.
Anyone can give me any clue on this? Thanks very much.
I've had a similar issues before- on one machine, a restart was required, on another, I had to uninstall ALL of my SL stuff, then uninstall Vstudio, then reinstall and reapply any SL add-ons.
Then it worked fine.
Also had a friend with the same issue- uninstall all, then reinstall worked for him also.
I believe these were machines with pre-rtm SL and Phone bits on them.
I've had a similar problem. I created a WP7 project using VB.Net. I built a WCF Class web service, a client side proxy class, and then a WP7 application with the service reference. When I added the service reference, the code generating utility would not build the required Reference.svcmap file detail (it only created the header information). However the project would still compile, yet I couldn't reference the service in code as it didn't exist in the underlying files.
I tried recreating the WP7 project in C# and everything worked. My guess is that the VB implementation of WP7 might still have some issues, however that is a guess only. I'm keen to see if anyone else has had the same issue specific to the VB WP7 template or if it is something else.
I bumped into the same problem, but it was fixed after a reboot as suggested in this thread by dethSwatch.
I do remember that a silverlight SDK update was installed a bit earlier, maybe the reboot is required after the update?
I think this issue might be related to the January Update to the WP7 tools. I managed to fix this issue by installing the VS10-KB2486994-x86.exe fix found on the above page. That sorted the issue I had with generating a client side proxy for the WCF service I wanted to call. Hope this helps.

Resources