MacGapProject / MacGap1

Desktop WebKit wrapper for HTML/CSS/JS applications.
Other
3.55k stars 208 forks source link

console.log results in developer tools' console #105

Closed jeff-h closed 10 years ago

jeff-h commented 10 years ago

I've been writing my JavaScript and debugging directly inside my MacGap app. I turned on the developer extras in MacGap and thus can right-click the window and choose "Inspect Element" to open the usual developer tools window.

All my console.logs were printed inside the developer tools' console, just like they would in Safari, NOT in the Xcode NSLog debug output pane. I find this much better, as it's a standard part of a JavaScript developer's usual workflow.

However, since messing with my MacGap app in Xcode, this behaviour no longer happens — all my console.logs are printed inside Xcode and the results never appear inside the developer tools' console.

Anyone have any idea what causes the console.logs to NOT be printed directly inside the developer tools console, when it's a Webview inside my MacGap app?

jeff-h commented 10 years ago

Solved this. One of the things I was playing with was nodelike inside MacGap, and I found that nodelike overrides the JavaScript console object. If you take that out, the console works as usual.

Related issue is at https://github.com/node-app/Nodelike/issues/23