Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode Native script - Don't recognise breakpoints #280

Closed
raulvaldoleiros opened this issue Feb 22, 2021 · 4 comments
Closed

VSCode Native script - Don't recognise breakpoints #280

raulvaldoleiros opened this issue Feb 22, 2021 · 4 comments

Comments

@raulvaldoleiros
Copy link

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

{
  "name": "@nativescript/template-hello-world-ng",
  "main": "main.js",
  "version": "7.0.9",
  "author": "NativeScript Team <oss@nativescript.org>",
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "publishConfig": {
    "access": "public"
  },
  "keywords": [
    "nativescript",
    "mobile",
    "angular",
    "{N}",
    "template"
  ],
  "repository": "<fill-your-repository-here>",
  "bugs": {
    "url": "https://github.com/NativeScript/NativeScript/issues"
  },
  "dependencies": {
    "@angular/animations": "~11.0.0",
    "@angular/common": "~11.0.0",
    "@angular/compiler": "~11.0.0",
    "@angular/core": "~11.0.0",
    "@angular/forms": "~11.0.0",
    "@angular/platform-browser": "~11.0.0",
    "@angular/platform-browser-dynamic": "~11.0.0",
    "@angular/router": "~11.0.0",
    "@nativescript/angular": "~11.0.0",
    "@nativescript/core": "~7.1.0",
    "@nativescript/schematics": "^11.0.0",
    "@nativescript/theme": "~3.0.0",
    "@nativescript/webpack": "3.0.0",
    "@schematics/angular": "^11.0.0",
    "project-helpers": "^0.4.0",
    "reflect-metadata": "~0.1.12",
    "rxjs": "^6.6.0",
    "tslint": "^6.1.3",
    "zone.js": "~0.11.1"
  },
  "devDependencies": {
    "@angular/cli": "^11.0.0",
    "@angular/compiler-cli": "~11.0.0",
    "@nativescript/android": "7.0.1",
    "@nativescript/ios": "7.2.0",
    "@nativescript/types": "~7.0.0",
    "@ngtools/webpack": "~11.0.0",
    "typescript": "~4.0.0"
  },
  "private": "true",
  "readme": "NativeScript Application"
}

Describe the bug
I'm using native script angular in vscode with nativescript extension. When I try to debug the application (ios) it doesn't stop in the breakpoints and the editor doesn't recognise the breakpoint.

In the debug console I can see the following messae "Error when trying to require webpack.config.js file from path '/Users/raulvaldoleiros/vscode-workspaces/ns-ng-course/webpack.config.js'. Error is: TypeError: host.onUnRecoverableConfigFileDiagnostic is not a function"

I also have uninstalled and installed webpack, added --debug-brk to arguments, executed ns migrate, created a new project from scratch and nothing seems to work.

To Reproduce
Run the launch file


{
            "name": "Launch on iOS",
            "type": "nativescript",
            "request": "launch",
            "platform": "ios",
            "appRoot": "${workspaceRoot}",
            "sourceMaps": true,
            "watch": true
        }

Expected behavior
The application stop in the breakpoint

@raulvaldoleiros
Copy link
Author

raulvaldoleiros commented Feb 23, 2021

I found this log file
nativescript-extension.txt

@benoitLecuppe
Copy link

same problem
Error when trying to require webpack.config.js file from path 'D:\repos\nsExemple\webpack.config.js'. Error is: Error: Cannot find module 'D:\Users\Benoit\AppData\Local\Programs\Microsoft VS Code\package.json'
Require stack:

  • D:\repos\nsExemple\node_modules@nativescript\webpack\dist\helpers\project.js
  • D:\repos\nsExemple\node_modules@nativescript\webpack\dist\helpers\dependencies.js
  • D:\repos\nsExemple\node_modules@nativescript\webpack\dist\helpers\externalConfigs.js
  • D:\repos\nsExemple\node_modules@nativescript\webpack\dist\index.js
  • D:\repos\nsExemple\webpack.config.js
  • c:\Users\Benoit.vscode\extensions\nativescript.nativescript-0.12.3\out\debug-adapter\nativeScriptDebugAdapter.js
  • c:\Users\Benoit.vscode\extensions\nativescript.nativescript-0.12.3\out\debug-adapter\nativeScriptDebug.js
  • D:\Users\Benoit\AppData\Local\Programs\Microsoft VS Code[eval]

VSC 1.63.2
extension : NativeScript v0.12.3
npm ls
nsExemple@1.0.0 D:\repos\nsExemple
├── @nativescript/android@8.1.1
├── @nativescript/core@8.1.5
├── @nativescript/theme@3.0.2
├── @nativescript/types@8.1.1
├── @nativescript/webpack@5.0.4
├── @types/node@14.6.4
├── nativescript-vue-template-compiler@2.9.0
├── nativescript-vue@2.9.0
├── typescript@4.3.5
└── vue@2.6.14

@bernatgy
Copy link

Has this extension been deprecated? How is debugging / attaching supposed to work right now? There hasn't been any activity here in many months, and compatibility issues are rampant. Seems like the extension is not compatible with NS8 for example.

UI.: After getting through many more, currently having this exact same issue.

@vallemar
Copy link
Contributor

Fixed in v0.12.4 #297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants