Is there a way to attach a VSCode debugger to an SPFx app running in a modern page or a Teams app? I've been using DevTools this entire time by attaching the following query string:
?debug=true&noredir=true&debugManifestsFile=https://localhost:4321/temp/manifests.js
I'd prefer to use Edge if possible. If it makes any difference, I'm using the fast-serve library.
Related
Fellows I am having a huge trouble with an project in Ionic and I want to use a dedugger in order to solve more effficiently.
Do you know how to use a debuggger in order to achieve that;
If the answer is the firefox debugger how I will use it in order to debug my application?
For Mozilla Firefox, the following are different ways to set a breakpoint within the JavaScript code in the debugger.
For Google Chrome, since this is the JavaScript you can also use Debugging with breakpoints (Debugging JavaScript). This will help you a lot.
More about debugging: How to Properly Debug Your Ionic Application.
I am using Visual Studio 2015 tools for Apache Cordova for mobile application development on Windows 7.
To build and run my app, I have to choose one solution platform and one target.
Is there any way to view the output on my browser just like a web app with no emulator?
When I press f5, the result will open in a browser in an emulator mode which I choose as system platform and target device. But I want to run my app like a web application, when you right click on index.html and select view in browser.
I look for a project setting or a ‘system platform’ and ‘target device’ value that work like that.
PS:Selecting any windows solution platform and local machine target needs Windows 8 or higher and the build process is failed.
Thank you.
The solution I found for my problem:
I used the url of my output result with emulator: "http://localhost:4400/index.html?enableripple=cordova-3.0.0-NexusS"
and then removed the emulator settings in url: "http://localhost:4400/index.html".
Using this url will cause some popups asking some things. These are for 'cordova.js' script which is referenced in index.html file of cordova project. As we do not need this in browser, commenting the line <script src="cordova.js"></script> from index.html, no dialog will open any more and the project will compile so faster for initial design that do not need cordova.
Now I will use chrome mobile mode (f12-> phone icon) to see mobile view of my app.
#A.M.
The answer depend on your expectations.
If you just want to view the page layout and test some of the associated Javascript, the answer is YES.
If you want to test the plugin libraries and associated JS, the answers is NO.
However, here are some items to be cautious with - either way.
When running your code on a device, you MUST wait for the
'deviceready'. There are not ifs, ands, ors, or buts on this - you
must wait.
You can emulate some of the plugins. This Summer some of HTML5 APIs have become available. If you want to write a shim, you can emulate some plugins with the HTML5 APIs, and use the Phonegap plugins on the mobile device. NOTE: some emulators now support HTML5 APIs.
Not all browsers are equal and not all webview libraries are equal. Cordova and Phonegap both use a webview library with their respective platforms. On Android, it is called Webview. On iOS, it is WKWebview. These libraries are finally starting to get some attention. So Google, Apple, Intel and others are all making competing libraries. *better for us* ;) One new library for Android is called crosswalk. Many developers like it, but it is bloated.
Best of Luck
Are there any tools/methods for debugging phonegap Blackberry(5,6,7) app . Presently am using Alert for debugging which is very tedious .
Since you are using PhoneGap, its always better to view/debug you app on a webkit browser like Chrome/Safari. Also try Ripple emulator from BlackBerry which is the best web emulator for mobile devices: https://chrome.google.com/webstore/detail/ripple-emulator-beta/geelfhphabnejjhdalkjhgipohgpdnoc?hl=en
Since you are developing a web app, and as far as I know there's no "official" IDE for BlackBerry Webworks, this question is not BB or Phonegap specific. You are just asking how to debug JavaScript. There are a lot of questions in SO about this, just run a search. I'll give you my two cents:
As the JavaScript code runs in a browser, you need to debug in the browser. Most browsers have built-in debugger or extensions. For Firefox I'd reccomend Firebug extension, in Chrome the built-in debugger is pretty good. I can't tell about IE but I think there's something similar.
If you need to debug on device, then use console instead of alert.
Finally, have a look at WebStorm. Probably the best IDE for JavaScript right now, but you need to purchase a license. It allows you to attach to the browser debugger and debug in the IDE.
Looking forward to the TideSDK 1.3 release. I've extended the sample app provided but I'm unable to figure out how to breakpoint my code and step through it for debugging purposes. Of course when running in the browser I can use chrome debugging tools but in the Tide sandbox how do I accomplish this?
One way to achieve this is to open up the inspector inside the app and use the webkit inspector to breakpoint and step through your source code.
I'm doing research on choosing a w3 framework for mobile apps(native) and came across trigger.io
As some of the team come from a very corporate / enterprisey background, Breakpoints + Debug is a key feature. I've watched the catalyst video and it looks very cool. However I didn't see breakpoints being set.
Do you know if its possible to set breakpoints + debug in trigger.io? Can I remote debug javascript when my app is running on device?
Thanks
Trigger.io Catalyst is a hosted version of the Weinre open-source project. Unfortunately it does not support setting break-points.
It is possible to display log messages in the console and to query the DOM and JavaScript namespace from the console which is a big step up from alerts.
One approach to development is to build the user flow on the web first so you can use the Chrome debug tools with breakpoints. And then add the native features (which can only be tested on the device / emulator) at end. Trigger.io's build to web feature supports this mode of development: