How to auto-attach vscode-debugger to vue-cli process - vue.js

I am trying to use the auto-attach feature of VSCode(version 1.50.1) to debug my vue app (vue-cli version": "4.3.1").
Like it is explained here:
https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_auto-attach-feature
My OS is Widows 10
In VSCode Auto Attach is set to to only with Flag.
I start my app with npm run dev.
This is how the dev command looks like in my package.json:
node --inspect --max_old_space_size=2048 node_modules/#vue/cli-service/bin/vue-cli-service.js serve
When i run npm run dev, the terminal prints: Debugger listening on ws://127.0.0.1:9229/2fa6ba43-dfa9-41cf-be5d-f0fc8945f02a
and:
Debugger attached
The Blue Bar on the bottom of VSCode turns orange and it seems like i am debugging.
But when i open the app in my browser (Chrome 86.0.4240.75) my Breakpoints are completely ignored.
I suspect that maybe the problem occurs because i do not access my app on "localhost:8080".
I use xip.io which results in an url like this: http://example.127.0.0.1.xip.io:8081/.
Has anyone an idea how to get it runnning?

Related

GLOBAL_AGENT.HTTP_PROXY not letting me build Electron Pacakge

the problem
npm init -y
npm i path electron request http
npx electron-packager . --arch=ia32 --platform=win32 --out=release --electron-version=13.1.9
to build an electron project found in the current directory. Previous to reformatting my OS, I never had issues with this. However, now every time I execute these commands, after the last one electron-packager.
the error
In the console, I see Unsupported GLOBAL_AGENT.HTTP_PROXY configuration value: URL protocol must be "http:"
I cannot find any help on Google, or Stackoverflow about why this is occurring.
what i tried
I tried commenting out all parts of code in my relatively small project, to try to figure out what is giving me this issue.
I also tried repackaging the same project on my MacOS & Windows 10/11 machines, nothing works.
I am really frustrated/confused as to why this is happening, especially since I was able to use electron-packager a while back on the exact same project with no issues.
project dependencies
http#0.0.1-security
electron#17.1.2
request#2.88.2
path#0.12.7
Actually this is a bug, has been fixed 5 hours ago (Mar 14, 2022, 9:55 PM GMT)
GLOBAL_AGENT.HTTP_PROXY configuration value: URL protocol must be http
Just do:
npm update

Error on running react-native run-android: "Unable to load script"

I did a first project on react-native, that still works when I want to emulate it on my AVD.
I started a react-native init new project that installed correctly but impossible to run it the first time, Node JS command open and shut down in a seconde. And, come to this point :
"Starting: Intent { cmp=com.ms/.MainActivity }"
Nothing happens : the following line is this one : PS C:\Users\arthu\MS>
And I get the error message : "Unable to load script. Make sure you either running a metro server (run react-native' start) or that your bundle 'index.android.bundle' is packaged correctly for release.
Thought it was due to the Node JS console, which was opening a few second, so I emptied its cache, didn't change anything, Re-installing Node JS, re-tried with my ancient project (which works), change port from where I run the project, nothing changed.
I guess it is not linked with Node JS, neither my code (because I didn't even start), but I am a bit confused about that, and didn't find a similar post ! Thank you for your answers ;)

How can i set firefox to be my default Remote JS Debugger for React-Native?

I don't have chrome installed for some reason. When I hit "debug JS remotely", i get a log saying, "chrome wasn't found", and when i try to access the url in firefox : http://localhost:8081/debugger-ui, it doesn't work.
I want to debug in Firefox browser. How can i change the default settings for react-native remote JS debugger.
Step1: Put the URL in your Firefox/Opera browser: http://localhost:8081/debugger-ui
Step2: Open the Console ( Ctrl+Shift+J or Cmd+Shift+J )
Step3: Hit Cmd+D on Simulator and select "Debug JS Remotely"
Step4: Hit Cmd+R on Simulator
Step5: Check the Console in the Browser
These steps will work for Opera Browser also
This works for me.
To use a custom JavaScript debugger in place of Chrome Developer Tools, set the REACT_DEBUGGER environment variable to a command that will start your custom debugger. You can then select "Debug JS Remotely" from the Developer Menu to start debugging.
The debugger will receive a list of all project roots, separated by a space. For example, if you set REACT_DEBUGGER="node /path/to/launchDebugger.js --port 2345 --type ReactNative", then the command node /path/to/launchDebugger.js --port 2345 --type ReactNative /path/to/reactNative/app will be used to start your debugger
for more info check this:
http://facebook.github.io/react-native/docs/debugging

keystone projet not getting updated while code changes

I'm new to keystone.js, but not new in the node and js framework world.
I installed keystone with the generator, I can run it with gulp or node keystone , in both cases the site is available on 3000, but updating js files in /routes or /models won't change anything until I re-run gulp or node... is that normal ?
I also ensured that I was in development mode with set NODE_ENV='development'
This has nothing to do with KeystoneJS.
By default neither gulp or node monitor for code changes.
If you want to monitor for code changes from within your gulp setup have a look at gulp-watch.
Otherwise, you can just use nodemon like so: nodemon keystone.js

running dart project says dart:html is not available for the standalone vm

I used Git to pull a project
I then start IntelliJ, and say: Open Project.
The project itself looks like it has 4 modules, Lab1, Lab2, Solution2, Solution2
I open the full project. In Lab1, i want to run to see how my web page looks, but when i say: Run main.dart the error kicked back is:
C:\code\dart-sdk\bin\dart.exe --ignore-unrecognized-flags --checked --enable-vm-service:51293 --trace_service_pause_events C:\code\workspace\tw_remoting_training\codelab_01\web\main.dart
Observatory listening on http://127.0.0.1:51293
The built-in library 'dart:html' is not available on the stand-alone VM.
'package:remoting_training/remoting_printer.dart': error: line 20 pos 1: library handler failed
import 'dart:html';
^
Process finished with exit code 254
Im not sure what is going on here though. As a secondary option, i will also try to Right-Click on index.html and click: Open with > Dartium but that shows a blank page. It shouldve done 4 async calls which printed strings to the screen.
Is there something I am missing? Is it not running because of it being a module in a project?
If your Dart script imports dart:html or a library that imports dart:html you can run that script only from the Dartium browser (by adding a script tag to HTML that points the that Dart script, or if you run it through pub build or dart2js in any browser), but it can't be run from the console.
With dart:io it's exactly the opposite, it can't be run in the browser.