I'm using Ionic 2 and VS Code. I'm able to debug in a chrome browser. How do I debug on an android device?
I'm new to VS Code but I believe that I need to add a configuration to launch.json like I did for Chrome. What does that configuration look like and are there any other parameters that need to be set?
Thank you for any help.
I found the answer here.
Delete existing launch.json file from .vscode directory and go to Debugger and click on setting icon it will show you installed debuggers and select one of them...
Only I deleted the entire .vscode directory. I then selected Cordova as the debugger and then launch.json populated with the correct configurations. Previously it was not populating. Now I select the "run android on device" press debug and everything works perfect. Breakpoints set in VS Code are being hit.
Nice!
Related
Following the steps at https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-cpp?view=vs-2019
I have completed the steps up to where I must click the Deploy checkboxes in the Configuration Manager, but they are greyed out.
This is a legacy MFC 32 bit application.
Am I missing something?
I have completed the steps up to where I must click the Deploy
checkboxes in the Configuration Manager, but they are greyed out.
1.Please make sure you've set the Debugger to launch to Remote Windows Debugger.
2.And after my check, you should configure the Deployment Directory so that the project is deployable and the Deploy Checkbox is able to click.
3.Also, please check the Configuration and Platform you selected in Project properties and Configuration Manager, they should be corresponding to work.
e.g:
If we complete the settings in this way:
In Configuration Manager,only when we choose Debug+X86(Active Configuration and Active Platform) the Deploy checkbox is available, and if we change the X86 to X64, the checkbox would be grayed.
Hope it helps:)
I've started a new project with Docker support.
How do I stop a browser window from opening when I start the project in Docker mode?
I hit F5 with "Docker" displayed next to the play icon on the tool bar and I always get a browser window open.
I've been into my project settings and turned off Launch URL for all project profiles.
I've also tried going into launchSettings.json and setting "launchBrowser": false, to try and stop it from happening. Note that changing the project properties does not seem to update the launchSettings.json file (annoyingly)!
This is really frustrating as for APIs I don't want a browser window to appear each time I start debugging. In fact, I don't want it for a website either as I typically have a window open that I refresh to see the changes.
How can I turn this off?
I found how to fix it.
In the VS solution there is a docker-compose project.
Right click on the docker-compose project and select properties.
In the General tab find the Launch Browser option and set its value to No.
I've installed Web Essentials 2017. When I open Visual Studio Enterprise 2017, it shows as being an installed extension, and "Reset Web Essentials" shows on the tools menu, but there are no settings that I can see. Shouldn't a settings dialog box be available somewhere?
Also, I thought if I create a .less file, open it, then save it, .css and .min.css files should immediately show up below the less file. That doesn't happen.
Additionally, the Web Essentials toolbar doesn't appear in Edge when I run a website from within Visual Studio. Hitting Ctrl doesn't make it appear.
What's going on here? Looks like Web essentials didn't install correctly and isn't working.
Clicking Tools->Reset Web Essentials fixed it. It looks like that just reinstalls it. Although I had already uninstalled and reinstalled, this worked.
There still doesn't appear to be an overall Web Essentials settings dialog box under tools. It appears that since it was broken up into individual components rather than one huge plugin, each plugin has its own little popup menu now, and a few of them show up when you right click on the Project.
According to this link it was removed for few reasons. To fix it you have to download the chrome extension and also download the Browser Link Inspector
I had the same issue with extension downloaded from the web.
So i installed it from the marketplace and it works just fine.
Following this tutorial:Introduction to Google Test with Xcode 6 and C++11 i have integrated Google Test(or gtest) framework into my iOS project written in C++. But when i choose test target and press "Run" button i got this log:"Message from debugger: Terminated due to code signing error". This log appears after "Build Succeeded" popup. If anyone has thoughts of how to fix this siging error please let me know. (P.S. i have valid iOS certificate and provision profile and can upload builds to the TestFlight)
I have got rid of this issue by performing next actions:
Select Tests target as active target.
Go to Product->Scheme->Edit Scheme.
From the left menu choose Run.
Then in the right menu choose Info tab.
Change Build Configuration from Debug to Release.
After this i can run tests without "signing error":))
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.