Comments (12)
@msaelices Sonar is an electron app, Mac is the officially supported version, but more could come soon. Sure, Chrome devtools would be a good choice, but the chrome debugging protocol is hard to understand / hook into from NativeScript and there is no easy way (not even sure if there is a way) to add vue-devtools to it.
When you open up the Chrome devtools for NativeScript, it runs the devtools "app" inside chrome - you can confirm this by pressing f12, and it will have a Chrome Devtools inspector inspecting the Chrome Devtools inspector (inspector-ception lol).
The plugins you have in your browser do not apply in the NativeScript devtools window, but even if they did it wouldn't be useful because vue-devtools injects a script tag into the page to establish the connection, which doesn't make sense in a NativeScript environment. I've done quite a bit of research about this, and Sonar seems like the better way at this point, since it will allow us to add vue-devtools sooner.
from nativescript-vue-devtools.
UPDATE
@znck has been working on making vue-devtools not rely on window
which prevented us from connecting it to NativeScript in the past, PR here: vuejs/devtools#732
With these changes we are now able to connect the standalone VueDevtools to a NativeScript-Vue app, and to make it easier I published this repository as an npm module nativescript-vue-devtools
. This is not yet usable since the above mentioned PR is not yet merged/released.
Once everything is released, I will document how to debug apps... EXCITING TIMES! :)
from nativescript-vue-devtools.
I've been eagerly watching the changes in vuejs/vue-devtools...this is really exciting!
from nativescript-vue-devtools.
OK that is really cool, especially since it has a network inspector...Vue and Chrome dev tools together in one app would be the holy grail!
from nativescript-vue-devtools.
- I was able to get a ns-vue app connected via websocket to the Electron app, using nativescript-socket-io, but only when running the Android build; iOS gave me a bunch of errors referencing dependency files it couldn't find, and could make an initial connection to the socket, but wouldn't emit any messages.
ld: warning: directory not found for option '-F/Users/damiani/Library/Developer/Xcode/DerivedData/dist-bdlvwjdomrcsvndurzdwgprdxnqn/Build/Products/Debug-iphonesimulator/Socket.IO-Client-Swift'
ld: warning: directory not found for option '-F/Users/damiani/Library/Developer/Xcode/DerivedData/dist-bdlvwjdomrcsvndurzdwgprdxnqn/Build/Products/Debug-iphonesimulator/StarscreamSocketIO'
- On Android, I can trigger the Electron app to initialize by emitting the
vue-devtools-init
event from the socket, but I haven't figured out how to get the hook injected in order to pick up the Vue instance running in NativeScript.
from nativescript-vue-devtools.
Awesome stuff, I haven't used a socket library in ns yet, but I know there are a few different ones - could be worth trying a few of them.
As for injecting the hook, I think the idea I added in the original issue about replacing window.__VUE_DEVTOOLS_GLOBAL_HOOK__
at build time (nativescript-vue build time) could be the easiest and best approach
from nativescript-vue-devtools.
I also tried nativescript-socket.io and had the same issue when building iOS. :(
from nativescript-vue-devtools.
@damiani Facebook just released Sonar, which might be the right tool for us! https://fbsonar.com/
It supports custom plugins - which seem to be using react, so I wonder if we can drop in a Vue app as a react component in there to run the devtools.
I would wait a bit to see if NativeScript will want to support it officially, because then we would only need to write a plugin for it.
This got me hyped up btw! :)
from nativescript-vue-devtools.
A Fbsonar desktop limitation is that runs only on Mac. In comparison, the chrome Vue dev-tools runs wherever Chrome runs (Linux, Windows, and Mac).
from nativescript-vue-devtools.
Landed, and documented: https://nativescript-vue.org/en/docs/getting-started/vue-devtools/
Closing 🎉
from nativescript-vue-devtools.
@rigor789 Awesome! I think you forgot to document explicitly to install the package with npm instal nativescript-vue-devtools --save
from nativescript-vue-devtools.
@msaelices thanks for the heads up, fixing now!
from nativescript-vue-devtools.
Related Issues (15)
- Failed to find module nativescript-vue-devtools HOT 2
- App crashes immediately on launch when devtools is open HOT 9
- Vuex never changes and crashes the app when clicking on a mutation HOT 4
- `tns preview` crashes when the app uses `nativescript-vue-devtools` HOT 1
- Vue Devtools stuck on vue logo. Error: Toasty Text is not set. HOT 4
- Nothing happens when I run npx vue-devtools HOT 6
- NS7 support? HOT 4
- Vuex HOT 33
- ReferenceError: document is not defined HOT 2
- Following the docs I get "Reference Error: io is not defined" HOT 7
- Crash with RadListView
- crash IO module not found found HOT 1
- Dependency nativescript-socket.io does not seem to work with nativescript-vue 2.0 HOT 2
- Unable to connect to devtool HOT 48
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-vue-devtools.