Showing posts with label debug. Show all posts
Showing posts with label debug. Show all posts

Thursday, August 21, 2014

Trigger breakpoint in Javascript

To trigger breakpoint in Javascript, you can add a 'debugger' in your code. For example:

function testing() {
    alert(123);
    debugger;
    alert(456);
}

The debugger will be triggered at runtime.

Wednesday, November 2, 2011

Debug mode in Eclipse and Tomcat

For Tomcat:
  set JPDA_ADDRESS=8000
  set JPDA_TRANSPORT=dt_socket
  catalina.bat jpda start

For Eclipse:
  Set Connection Port (8000) and Connection Host (localhost) in "Run > Debug Configurations"
  Configuration Type: "Remote Java Application"
  Set connection port to "8000"
  Set connection host to "localhost"

CSP on Apache

To add CSP to root if sort of funny. The following will NOT work for most cases !!     <LocationMatch "^/$">        Header s...