Showing posts with label Debug. Show all posts
Showing posts with label Debug. Show all posts

Wednesday, November 02, 2016

IntelliJ Ultimate Debugging JavaScript from the LightBend Activator/Play Framework

Symptom

You tried to debug a {java | type|}script in Chrome browser and it does not fire a breakpoint.

You have already made sure that JetBrain extension is installed in Chrome and configured right.

You've also added the JavaScript debugging configuration, and the web page launches (e.g., http://localhost:9000)

Fix

There is one more missing piece to this puzzle. You need to map the URL for where the scripts come from. This is clearly documented in the IntelliJ documentation, but nevertheless, it is not intuitive enough that it took a while for me to find out.

The key is that you need to type in the Remote URL in the Remote URL list. This is NOT OPTIONAL for Play users. If you are running the "out of the box" configuration of Play framework, and putting in your *.js under the "public" directory somewhere, then all you need to do is to just type in /assets (will become http://assets after you save it without any ill effect) where the public folder is in the list. Save it and any JavaScript or Typescript (with a map) can be debugged.

Enjoy!





Saturday, June 09, 2012

VS 2010 Web Debug Fails To Start Due to "Invalid file name for file monitoring"

Symptom:

You try to launch your ASP.NET web application from Microsoft Visual Studio (2010) and you get the following error (you swear it was working an hour ago.) Note that the file name mentioned does not really matter. The symptom is that you cannot launch a web page in debug mode.

Invalid file name for file monitoring: 'C:\Blah\Whatever\App_LocalResources'. Common reasons for failure include:

Cause:

The root cause is completely understood, but it has something to do with catching all un-handled CLR exceptions in the debug menu.

My Fix (May Not Work With You):


  • Go to Debug->Exceptions and un-check all un-handled exception checking.
  • Try to launch the debug session again. This time, it worked for me.
  • Go to Debug menu and then clear all break-points. This time, I can re-enable un-handled CLI exceptions and back to be able to launch and debug the app.
  • If above does not work, clear the .NET temp files for the framework version you are using. For example,

    C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files