Run chrome in device mode without activating debugger - ionic2

I'm using VS Code to develop an Ionic 2 app and using it's chrome debugging extension to step through the code within VS Code. Being an Ionic app, I primarily want to run it in device mode to simulate mobile device, but when I open the Dev Tools window Chrome's internal debugger automatically connects and breaks the connection with VS Code. It's really annoying that those two functions are connected with each other. Regardless, is there a way to work around this?

According to this VS forum post, https://developercommunity.visualstudio.com/content/problem/2828/vs-2017-rc1-cant-disable-chrome-debugging-support.html, "It looks like they added an option in Debugging > General called Enable Javascript debugging for ASP.NET (Chrome and IE) to disable this. I think this report can be closed."
Disclamer: I copied that quote from the forum post and have no intention of plagirism.

Related

Is there any alternative to Remote-Debugging-Server (like Weinre)

I am looking for a more modern Weinre alternative
Weinre has been without support for about 3 years
Weinre allows me to generate a local server (Example: http://192.168.0.1:8888) exclusive to remotely debug
There are many good alternatives like devtool but... they don't allow you to mount a local server
The reason why I am looking for a remote debugging system is because I want to be able to debug from one Tablet to another tablet, the first tablet that runs the "devtools" from a URL and the second with my page to debug
Tools like Chrome USB debugging only works from a PC plugged into a phone, but not from a phone to another phone over the internet
Do you know any package that allows me to create a devtools server?
iOS WebKit debug proxy is a great modern alternative.
It allows you to debug directly in Chrome with live preview.

developer tools does not loads resources

When I run my ionic project to my mobile it was working good, and when I open developer tools it's fine.
I could able to view all console statement in my developer tool window, now when I run it again app runs well in the browser and in my mobile , I am not able to see any console statement.
What I get is
device ready has not fired after 5 seconds.
cordova.js:1223
Failed to load resource
file:///android_asset/www/build/index.js.map
could someone help me to view my console statements
This should be fixed in cordova-android 6.1.0. It has not been added to the npm-registry yet, so you can use it by placing this to your config.xml:
<engine name="android" spec="https://github.com/apache/cordova-android.git#6.1.0"/>

Microsoft edge remote debugging

Is there any way to remotely debug a mobile web app in a W10&Edge phone from a computer through a USB connection? I mean, the same way we debug web apps in Android and iOS through Chrome and Safari dev tools.
If it is posible, which are the requirements of the computer? Would it be posible from a W7 or W8 computer?
I do not believe it is possible via USB, but you can use something like VorlonJS to debug websites remotely, even on mobile devices.
I demo exactly how to do this in a sample on GitHub.
Developer:
Simply navigate to your dashboard at http://vorlondebugger.azurewebsites.net/dashboard/default. This is your dashboard for viewing who is currently on the Vorlon demo site.
Users:
Instruct them to navigate to http://vorlondemoapp.azurewebsites.net/, which is a basic HTML5 boilerplate site.
Usage:
Look at your dashboard, and you'll now see that the users are viewing the page. You can alter their code on-the-fly.
I had a same question. But I solve my problem with this:
I copied html+js code into my UWP application and then I can remote debug it with Visual Studio

How to Debug Ionic WebApp?

I want to debug my ionic application in WebStorm.
I am able to run the app in browser. But how can I debug?
I tried: ionic serve --debug which doesn't seem to trigger any debugging?
How can I debug the app when it runs in browser?
With Chrome you can type chrome://inspect into your address bar
As soon as you are running your Android app, you can inspect the app when you are running it with the "ionic run android" or "ionic emulate android" command
The version of Android, however, must be higher than 4.3 I think...
According to the documentation there's a few different way's to do this. Also could you try one of these listed below since you have tried ionic serve already?
ionic run
ionic emulate
The run or emulate command will deploy the app to the specified platform devices/emulators. You can also run live reload on the specified platform device by adding the --livereload option. The live reload functionality is similar to ionic serve, but instead of developing and debugging an app using a standard browser, the compiled hybrid app itself is watching for any changes to its files and reloading the app when needed. This reduces the requirement to constantly rebuild the app for small changes.
Hope this get's you going! Let me know how it work's out for you.
I found this tool very useful, you can attach your device and get a real time inspector on your Cordova app(for iOS and Android platforms).
The browser is where I do most of my debugging for ionic. What browser are you using to do the debugging? I use Chrome and turn on DevTools. There is a source tab where you can browse your app code to find spots for breakpoints. For example, you can set a breakpoint in the code for a controller on a click event and step through the code. Then, you can use the console to execute commands to test values and inspect objects, etc. Are you unable to make this work? Or, unfamiliar w/ the DevTools? If unfamiliar, there is a resource available here. If not working, are the breakpoints not being hit?
There are a few ways to debug your ionic app.
In the browser you can catch the errors in the console.
If you are emulating your app on a simulator or a mobile device you can install the cardova plugin that displays js errors in the xcode console. So you can emulate your device and catch errors on xcode.
Here is how you add the plugin:
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git
An alternative is using ionicLab. It worked for me doing the steps: Install the program and prepare all the project dependencies prior to testing. Then, click on Serve option from Testing which is under Platform menu. When the project has been executed, click on the arrow icon of the Preview bar.
As a result, Ionic will throw a Chrome window with the loaded project, so, you can use Developer Tools as it's used commonly. You ought to watch the javascript files, which you use in your project, so that you can debug them.
Simply run: ionic serve -l and inspect from browser developer options.

download and run exe from chrome browser using c++ plugin

I have a webpage where when I click a button, it should download an exe from a url and the exe should get automatically invoked without user intervention.
In Internet Explorer I achieved this through activex control ( .ocx ) deployed as a .cab file.
I am planning to extend this to chrome and firefox platform too. ( atleast chrome for the first step ).
I don't want to use Java applet ( need to remove java dependency ). I know I could achieve this through Firebreath plugin but clearly this is not a good time to dive into NPAPI plugin ( since NPAPI is already being fading out. Chrome has begun phasing out NPAPI ).
When I looked into alternative Plugin technologies to NPAPI, I stumbled upon Google Native Client. On further reading I got to know Nacl too won't fit my needs since os calls api will not work in nacl ( I hope URLDownloadToFile api or createprocess or shellexecute wouldn't work. Correct me if I am wrong ).
Should I go for Native Messaging? Is there anyother alternative technology am missing ? Guide me Please .
NPAPI until it goes away will let you do what you want; other than that Native Messaging is the only option.
As others have mentioned, this is a Really Bad Idea(tm).
Thanks all the people . I finally settled with Launch Application Using Custom Protocol Handler . http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx . This fitted my needs .
As suggested above, Chrome's native messaging appears to be the way to go - on Chrome.
First, have a look here: This blog entry shows that native messaging can be used to launch "calc.exe". I've yet to try it myself - but it looks promising:
https://plus.google.com/+FrancoisBeaufort/posts/jdTrmmZL9Xh
One thing to keep in mind is that the Native Messaging technique will only work from a Chrome Extension, which opens up an entire set of related questions.
(1) Can Chrome extensions be installed for all users using group policy? or via the registry?
-Yes, according to http://www.chromium.org/administrators/pre-installed-extensions
Later edit: only "published" extensions can be added via the registry. see - https://developer.chrome.com/extensions/external_extensions
(2) Can you detect whether an extension is already installed?
-Yes, Chrome Extension: How to detect if an extension is installed using Content Scripts
So maybe its possible to have a two-phase process:
-Your users will head to the web page, which will test for the extension (using #1 above)
-If its not there, have the users download and install the .exe (this will require interaction).
-The .exe will deploy the extension files and register it for Chrome (using #2 above)
-On subsequent visits, the already-installed extension can be used to launch/communicate with the now-already-installed .exe (using Native Messaging)