Select to view content in your preferred language

Web App Builder Debugging

5768
3
04-01-2015 12:55 PM
MichaelFedak
Deactivated User

Hello,

I was wondering if anyone could provide some guidance on how to debug custom made widgets in web app builder. I am trying to use the developer console in chrome and breakpoints do not seem to have any effect (I am guessing what is actually run on the browser is a minified version of the widget) as well as console logging/info does not seem to do anything.

I know the command line has some debugging info but that seems to only be for the server.

I would appreciate any help.

0 Kudos
3 Replies
TimWitt2
MVP Alum

Michael,

breakpoints work pretty well for me. It seems that where you place the breakpoints the code has not run yet.

I always like to start out with a console.log("Test") just to make sure I place the code right.

Maybe just put this in your widget.js

onOpen: function() {

     console.log("Test")

};

and go from there?

0 Kudos
SamDrummond2
Deactivated User

Hey Michael,

I'm agree with you - I think it is because you are using a minified version of the widget. I've used both Chrome and Firefox to debug custom widgets (and Web AppBuilder souce code). Are you able to debug any of the OOTB widgets from the developers edition?

Sam

0 Kudos
Drew
by
Frequent Contributor

The keyword "debugger" in your code will cause your code to break at that location.

Its handy.

Drew