nativescript-community / nativescript-vscode-extension

A Visual Studio Code Extension for NativeScript
https://www.nativescript.org/visual-studio-code
Apache License 2.0
82 stars 32 forks source link

fix iOS connection to loopback address (127.0.0.1) and sourceMapPathOverrides for all file extensions #297

Closed vallemar closed 6 months ago

vallemar commented 7 months ago

On iOS it never worked because by not specifying the address the address 127.0.0.1 was used and the websocket server rejected the connection. In Android it is just the opposite, it rejects the localhost connection and accepts 127.0.0.1 so it has been handled to establish the address that will then be used by the NativeScriptTargetDiscovery class.

Also added logic to add sourceMapPathOverrides for files ["js", "ts", "vue", "svelte", "jsx", "tsx"] since they didn't seem to work and breakpoints didn't work they worked. Now this property devtoolNamespace is not necessary since the name of the package.json.name is searched and added to sourceMapPathOverrides, but it has also been added the logic so that users who have it and overwrite package.json.name in the project add the value set to devtoolNamespace

In addition, the vscode engine has been updated to the latest version, and some dependencies have also been updated (@vscode/debugadapter, @vscode/vsce and @vscode/debugprotocol).

All tested on ios and android for ts and vue3 projects.

Close: https://github.com/NativeScript/nativescript-vscode-extension/issues/296 https://github.com/NativeScript/nativescript-vscode-extension/issues/293 https://github.com/NativeScript/nativescript-vscode-extension/issues/286 https://github.com/NativeScript/nativescript-vscode-extension/issues/280

vallemar commented 7 months ago

I think this PR is ready for review!

farfromrefug commented 6 months ago

@vallemar the repo is now part of community. Would you like to become a maintainer of this plugin?

vallemar commented 6 months ago

@farfromrefug Yeah!

farfromrefug commented 6 months ago

@vallemar awesome then you officially are!

rigor789 commented 6 months ago

Hail to the savior @vallemar 👑!