How to debug settings page of custom widgets?

4108
7
Jump to solution
04-05-2016 11:16 PM
PavelVeselský1
New Contributor III

I'm developing a setting page for my widget. To debug it, I consulted the guide again and found this advice:

During development, use http://your host/webappbuilder/?appid=stemapp to directly access your widget. This URL helps test the configuration page of the widget.

So I tried to open my builder with ?appid=stemapp query string. I got the list of my apps as though there was no query string. The only difference is that when I open an app from this page the loading lasts forever, not few seconds as when opened from the normal WAB root. This doesn't seem to be the direct access for my widget. Google on web appbuilder "appid=stemapp" found only the guide and two pages citing it, so it's possible that it is just a documentation error and the direct widget access either doesn't exist or is somewhere else.

So, do I have any better options for setting page debugging than app edit > widgets? While editing the app, especially early stages of the debugging are frustrating, Create widget setting page error:widget/MyWidget/Widget is not very helpful.

Full disclosure: I've reposted this from gis.stackexchange.com.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Pavel,

  Using http://localhost:3344/webappviewer/?config=sample-configs/config-demo.json would mean that you are actually launching an app notice the "webappviewer" vs "webappbuilder" in the url. I have done some testing and it seems that there is an error in the guide the url is actually:

http://localhost:3344/webappbuilder/?id=stemapp

Notice the parameter is id not appid

Junshan Liu

View solution in original post

7 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Pavel,

  I develop widget all the time and I never use that from the guide. Here is my workflow:

https://community.esri.com/message/576495#comment-576497

So, do I have any better options for setting page debugging than app edit > widgets?

Not that I have found.

PavelVeselský1
New Contributor III

So the hint in the documentation is misleading? I was afraid it's like this after googling it. It's unlikely that others would hide a neat setting-debugging option that even an expert of your level wouldn't find, so I accept your answer.

0 Kudos
PavelVeselský1
New Contributor III

It took me a while to understand it... It's no documentation error, the "direct access" is the option to make another app within stemapp, isn't it?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Pavel,

  I think what they mean by:

to directly access your widget

is that you do not have to create an app to be able to add your widget and test the settings UI. Normally when you create a widget you add it to the stemapp and then then create a new app and add your widget from the stemapp widgets folder. Using the guides method you can launch the stemapp directly from WAB and not have to create a new app.

PavelVeselský1
New Contributor III

So far I use http://localhost:3344/webappviewer/?config=sample-configs/config-demo.json to work with the widgets in stemapp, but it doesn't show the setting. So how to debug setting in stemapp (if it is possible)?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Pavel,

  Using http://localhost:3344/webappviewer/?config=sample-configs/config-demo.json would mean that you are actually launching an app notice the "webappviewer" vs "webappbuilder" in the url. I have done some testing and it seems that there is an error in the guide the url is actually:

http://localhost:3344/webappbuilder/?id=stemapp

Notice the parameter is id not appid

Junshan Liu

View solution in original post

PavelVeselský1
New Contributor III

Cool, now I'm able to fully debug my stemapp instance, including the setting. I will still use webappviewer for debugging widgets (not settings) because it's a little faster, but I'm glad I have this stemapp option, and that the documentation error was found and probably may be corrected.

Thank you, Robert!

0 Kudos