On Tuesday, March 15, 2016 at 4:39:34 PM UTC-4, Larry Martell wrote:
>
> I have an app written in Qt and via a mechanism that I am not really clear 
> on some Angular JS code gets run when requests are sent to certain URLs 
> that contain a #. From what I was able to learn this somehow goes to some 
> Angular code that intercepts the request with $routeProvider and does 
> something. Not sure how that all hangs together, but it probably have 
> something to do with nginx.
>
> How can I debug that Angular code? There's no browser involved so I can't 
> use the standard tools I would use there. Even just printing some variable 
> and/or process state would help, but how can I do that in this scenario?
>

Answering my own question for anyone searching for the same thing.

Qt has a QWebInspector class that give you all the familiar tools you'd get 
using the Chrome web developer tools. It was very easy to use. I did this:

  ui->webView->setUrl(url); 
  QWebPage *page = ui->webView->page();
  page->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
  QWebInspector *inspector = new QWebInspector();
  inspector->setPage(page);
  inspector->show();

And this gave me an error console, JS debugger, and other goodies. 

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to