Problem to run chrome debugger in VS Code - visual-studio-code

Hi I've got a problem to run Chrome Debugger directly in VS Code. I'm working on Linux Mint.
Now i try to run debugger and error message says: Unable to launch browser: "Unable to find Chrome version stable. Available auto-discovered versions are: ["dev"]. You can set the "runtimeExecutable" in your launch.json to one of these, or provide an absolute path to the browser executable."
Following the sugesstion I've added runtimeExecutable to chromeExecutable and now the error is:
Unable to Attach to the browser.
Google Chrome is installed on my machine version: 83.0.4103.116-1.
Thanks for help in advance
Error:
Current config:

1. Type chrome://version/ in Chrome browser.
2. Notice you will get some thing like this :::
Google Chrome :: 86.0.4240.80 (Official Build) (x86_64)
Revision :: 7ed88b53bda45a2d19efb4f8706dd6b6cad0d3af-refs/branch-heads/4240#{#1183}
OS :: macOS Version 10.15.7 (Build 19H2)
JavaScript :: V8 8.6.395.10
Flash :: 32.0.0.445 /Users/shivamgupta/Library/Application Support/Google/Chrome/PepperFlash/32.0.0.445/PepperFlashPlayer.plugin
User Agent :: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36
Command Line :: /Applications/Chrome.app/Contents/MacOS/Google Chrome -psn_0_57358 --flag-switches-begin --flag-switches-end --restore-last-session
Executable Path :: /Applications/Chrome.app/Contents/MacOS/Google Chrome
Profile Path :: /Users/shivamgupta/Library/Application Support/Google/Chrome/Default
Variations :: 84085631-ab02a1cf dff70c3e-377be55a .......,.
Copy the Executable Path to runTimeExecutable
Now Copy this snippet in launch.json::
"configurations": [
{
"name": "Launch Chrome",
"request": "launch",
"type": "pwa-chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/public",
"runtimeExecutable": "/Applications/Chrome.app/Contents/MacOS/Google Chrome"
}
]

I have the same problem. And found how to set
debug.javascript.usePreview: false in VS settings

I had the same problem today, It works for me to use runtimeExecutable as #Shivam Gupta said,But I still want to know what is causing the problem. And finally found the reason.For some reason I have two chrome,One of the two is damaged,In chromeluncher in debuger, chromefinder is used to locate the location of chrome in your system.Without specifying a path, it will search for chrome.
So another solution is to just delete the chrome you don't use. This way chromefinder can correctly find the chrome you are using.It works for me.

Related

getting this error while running flutter app on chrome

I'm trying to run my app on Chrome but I'm getting these errors. Also installed windows visual c++ update but still not working
f5:
Unable to launch browser : spawn unknown
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}
Flutter run -d chrome :
CreateProcessW failed 14001
Oops; flutter has exited unexpectedly: "ProcessException: The application has failed to start because its side-by-side configuration is incorrect.
Please see the application event log or use the command-line sxstrace.exe tool for more detail.
Command: C:\Users\abc\AppData\Local\Google\Chrome\Application\chrome.exe
--user-data-dir=C:\Users\abc\AppData\Local\Temp\flutter_tools.282fd59e\flutter_tools_chrome_device.1c0b2e2a --remote-debugging-port=1636
--disable-background-timer-throttling --disable-extensions --disable-popup-blocking --bwsi --no-first-run --no-default-browser-check
--disable-default-apps --disable-translate http://localhost:1573".
A crash report has been written to D:\LaughBit\laughbit\flutter_06.log.
This crash may already be reported. Check GitHub for similar crashes.
https://github.com/flutter/flutter/issues?q=is%3Aissue+ProcessException%3A+The+application+has+failed+to+start+because+its+side-by-side+configuration+is+incorrect.+Please+see+the+application+event+log+or+use+the+command-line+sxstrace.exe+tool+for+more+detail.%0D%0A%0A++Command%3A+C%3A%5CUsers%5Cabc%5CAppData%5CLocal%5CGoogle%5CChrome%5CApplication%5Cchrome.exe+--user-data-dir%3DC%3A%5CUsers%5Cabc%5CAppData%5CLocal%5CTemp%5Cflutter_tools.282fd59e%5Cflutter_tools_chrome_device.1c0b2e2a+--remote-debugging-port%3D1636+--disable-background-timer-throttling+--disable-extensions+--disable-popup-blocking+--bwsi+--no-first-run+--no-default-browser-check+--disable-default-apps+--disable-translate+http%3A%2F%2Flocalhost%3A1573
To report your crash to the Flutter team, first read the guide to filing a bug.
https://flutter.dev/docs/resources/bug-reports
Create a new GitHub issue by pasting this link into your browser and completing the issue template. Thank you!
https://git.io/JOSer
Go to Google Chrome File location, let say on Windows 10/11, or even in a shortcut icon -> Right-click -> Properties -> Open File Location.
You will see two applications of the chrome: chrome.exe and chrome_new.exe.
Run the chrome_new.exe and it will delete and replace the previous chrome.exe.
After that, you will now be able to start and use Google Chrome again.

VSCode only targets old verson of Illustrator (CS6)

I recently moved to a new workstation and cannot target an Adobe Application using VSCode and Extendscript Debugger. The workstaton previously had CS 6 installed on it, but now we use CC. I'm using Ilustrator 2019.
I can target Illustrator:
Target Menu Works
Illustrator 2019 shows up in the bar along the bottom:
AI 2019 looks like it is the target
But, then when I run the DeBugger it says CS 6 isn't running and I can't run CC2019?
Asked to target CS6?
Using MacOS 10.12.6
VSCode 1.50.1
ExtendscriptDebugger 1.1.2
I think you need to check the launch.json file to set the targetSpecifier version number.
For example, for After Effects 2020, I use this configuration to debug. This object is found in the configruations array in the launch.json file:
{
"type": "extendscript-debug",
"request": "launch",
"name": "My app debug",
"program": "${workspaceFolder}/Scripts/source.jsx",
"trace" : true,
"targetSpecifier": "aftereffects-17.0",
"engineName": "main",
"preLaunchTask": "debug-my-app",
"dontBreakOnErrors" : true
}
So, likely you need to find out the value for the targetSpecifier for the version of Illustrator you want the debugger to target.

Unable to debug flutter dart code in VS Code, Unverified Breakpoint error

When the code is not running, I can add breakpoint (round red circle), but as soon as it goes into debug mode, it turns into unverified breakpoint (grey hollow circle) and doesn't work at all. However, the same project works well on other systems.
I've no idea what the problem is or what the solution would be.
I've tried reinstalling flutter SDK numerous times, and have gone through a lot of links on SOF and GitHub regarding this, but none has been helpful enough.
Environment - VS Code,
Flutter version: 1.17.2
Flutter doctor -
[✓] Flutter (Channel stable, v1.17.2, on Mac OS X 10.15.3 19D76, locale en-GB)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
You may also want to add it to your PATH environment variable.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[!] Android Studio (not installed)
[✓] VS Code (version 1.45.1)
[✓] Connected device (1 available)
! Doctor found issues in 2 categories.
My launch.json File -
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Flutter: Run all Tests",
"type": "dart",
"request": "launch",
"program": "./test/"
},
{
"name": "Dart: Run all Tests",
"type": "dart",
"request": "launch",
"program": "./test/"
},
{
"name": "Dart",
"type": "dart",
"request": "launch",
"program": "bin/main.dart"
},
{
"name": "Dart: Attach to Process",
"type": "dart",
"request": "attach"
},
{
"name": "Flutter",
"request": "launch",
"type": "dart"
}
]
}
Also, If you know any good alternatives to VSCode and Android Studio for Flutter, please share.
i came from mac and always use fn + f5, on windows that means start withouth debugggin, that was my mistake.
"version": "0.2.0",
"configurations": [
{
"name": "Flutter",
"request": "launch",
"type": "dart",
"flutterMode": "debug"
}
]
}
This is my launch.json file ... changing "flutterMode" from profile to debug solved the issue ... if you dont have this line adding it could help.
For anybody running into this problem while trying to debug external libraries or sdk code: Make sure you checked "Dart: Debug External Libraries" and "Dart: Debug Sdk Libraries" under Settings > Extensions > Dart & Flutter as described here.
You can also add the following to your settings.json
"dart.debugExternalLibraries": true,
"dart.debugSdkLibraries": true,
Clicking Run on the top menu in VS code and selecting 'Enable all breakpoints' worked for me. Though you have to place your breakpoint first.
You can also try placing your breakpoint and save your code, then leave the emulator running and close and restart your vs code IDE and run the app with debugging.
For flutter-web I had to change back to <base href="/"> within the web/index.html. A custom href lead to a none-debuggable project.
Navigate to the Run Tab and select Dart & Flutter from the drop down menu, finally hit the play button.
Your main.dart file's path is not specified right.
so in this block
"name": "Dart",
"type": "dart",
"request": "launch",
"program": "bin/main.dart"
please use
"program": "lib/main.dart"
I was also facing the same issue, I am looking for the exact reason but removing the launch.json file worked for me.
Have faced the same issue, resolved by stopping the current active session and click on RUN and select START DEBUGGING. This worked for me.
I faced the same problem with debug in certain dart files, but the other files I could.
Then I realized that it happened when I call another file and this trick would help:
Instead of typing:
import '../form/productdetail.dart';
I replaced with:
import 'package:myapp/form/productdetail.dart';
and it helped.
I had a similar problem. I solved by completely uninstalling and reinstalling Vscode + remove the data. See here
In my case, the parents folder contains special character (#):
.../#Projects/my_project/
Remove the # and the debug goes well:
.../Projects/my_project/
I had a similar problem. My platform is Ubuntu 20.04. I was setting the breakpoint in vscode expecting the vscode debugger to work immediately, but no. After an hour of googling, I hit the Flutter docs on the DevTools page.
To resolve :
Open your flutter project in vscode.
Follow the 'Install from VS Code' section of the docs to install DevTools.
Start your emulator, wait for it to completely load up.
Select Run => Start Debugging.
Check that app is running as expected in the emulator.
Select commandPalette => Dart:Open DevTools => 'Open DevTools in web browser'. The DevTools dashboard opens in a new browser tab.
Select the Debugger tab.
Open the relevent code file and add your breakpoint by clicking the leftmost breakpoint column at the required line.
Progress your app by clicking the emulator UI. Vscode debugger should stop at your breakpoint.
Use the vscode debugging controls thereafter.
Try to rebuild your launch.json file.
Remove the old file from the .vscode directory in vscode, then goto Run and Debug window and create a new launch file.

vscode-chrome-debug Failed to load resource ERR_CONNECTION_REFUSED

Installed the vscode-chrome-debug extention and attempted to launch an angular.js site. I'm able to connect to the chrome debugger, but accessing any resources via localhost:9009 like /index.html or /json fail to load. Running chrome with developer mode on to disable extensions.
Has anyone dealt with this before? Is this a bug in the extension? If anyone sees anything I'm doing wrong please let me know. Thanks!
launch.json
{
"name": "Launch localhost",
"type": "chrome",
"request": "launch",
"url": "http://localhost:9009/index.html",
"webRoot": "${workspaceRoot}",
"diagnosticLogging": true,
"userDataDir": "c:\\out\\chrome\\",
"sourceMaps": false
}
debug console output
›OS: win32 ia32
›Node: v5.10.0
›vscode-chrome-debug-core: 0.1.7
›debugger-for-chrome: 0.4.6
›spawn('C:\Program Files (x86)\Google\Chrome\Application\chrome.exe', ["--remote-debugging-port=9222","--no-first-run","--no-default-browser-check","--user-data-dir=c:\\out\\chrome\\","http://localhost:9009/index.html"])
›Attempting to attach on 127.0.0.1:9222
Failed to load resource: net::ERR_CONNECTION_REFUSED (http://localhost:9009/index.html)
There's a missing step in my setup... I need to run a web server! Seems obvious but I was under the assumption that the debug extension was doing something under the covers to serve up the site given the static file location.
I setup a gulpfile and task to run a gulp-webserver. I ran the launch task and then launched the debugger and it worked.

Gwt starting sample project

I am a beginer for gwt application when i am creating a sample application after all steps i am geting these errors in my Development mode window.
1.[ERROR] [mysecondproj] - Unable to initialize static dispatcher
2.[ERROR] [mysecondproj] - Failed to load module 'mysecondproj' from user agent 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/33.0.1712.2 Safari/537.36' at
127.0.0.1:63405
And also in browser one message is coming like
3.Plugin failed to connect to Development Mode server at 127.0.0.1:9997.
I am using jdk 7,eclipse(luna),plugin version-4.3,sdk version-2.7.0and app engine version-1.9.18.so please help me.
I ran into a similar problem, but I got errors that said
java.lang.NoSuchMethodError: org.obectweb.asm.MethodVisitor.vistMetodInsn(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
This ended up being a buildpath problem. To fix it I did the following:
Right click on your package in Eclipse>Build Path>Configure Build Path
Go to the Order and Export Tab
Select GWT SDK and move it up above the App Engine SDK [appengine-java-sdk]