Skip to content

[Debugging] Break points in platform specific files and/or symlink files in node_modules are not hit with "@next" version #252

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

Closed
VladimirAmiorkov opened this issue May 3, 2019 · 2 comments
Assignees

Comments

@VladimirAmiorkov
Copy link

Environment

  • CLI: 5.4.0-2019-05-02-13208
  • Cross-platform modules: 5.3.1
  • Android Runtime: not tested
  • iOS Runtime: 5.3.0
  • Plugin(s):
"dependencies": {
  "nativescript-image": "~2.1.0",
  "nativescript-theme-core": "^1.0.4",
  "nativescript-ui-listview": "../src",
  "nativescript-unit-test-runner": "^0.3.4",
  "tns-core-modules": "^5.0.0"
},
"devDependencies": {
  "@types/chai": "^4.0.2",
  "@types/mocha": "^2.2.41",
  "@types/node": "^7.0.5",
  "jasmine-core": "^2.5.2",
  "karma": "^1.3.0",
  "karma-jasmine": "^1.0.2",
  "karma-nativescript-launcher": "^0.4.0",
  "markdown-snippet-injector": "^0.2.2",
  "mocha": "^3.3.0",
  "mocha-junit-reporter": "^1.18.0",
  "mocha-multi": "^1.0.1",
  "mochawesome": "^3.1.1",
  "nativescript-css-loader": "~0.26.1",
  "nativescript-dev-appium": "5.0.0",
  "nativescript-dev-typescript": "~0.9.0",
  "nativescript-dev-webpack": "^0.22.0-next-2019-04-17-111030-01",
  "tns-platform-declarations": "^5.0.0",
  "tslint": "~5.11.0"
},

Describe the bug

First scenario:

After installing the @next when using VS Code to either Attach to iOS or Lunch on iOS any break points placed in a plugin that is using symlink and is in node_modules is not hit.

Second scenario:

A different scenario that also does not hit its break points is adding a break point to a non symlink plugin in node_modules but in the platform specific file (.ios.js). In this scenarios a break point in the non platform specific file is hit.

To Reproduce

First scenario:

Using this demo app if you symlink the nativescript-ui-listview code if you place a break point in VS Code in the createNativeView in the node_modules/nativescript-ui-listview/ui-listview.ios.ts file it will not be hit after you navigate to for example "Getting Started" page. (both breakpoints in platform specific and non platform specific files are not hit)

Second scenario:

Using this demo if you place a break point in VS Code at viewDidLayoutSubviews in the node_modules/tns-core-modules/ui/page/page.ios.js. (only breakpoints in platform specific files are not hit)

Expected behavior

Break points in VS Code are hit in both platform specific files and in symlink plugins in node_modules

Sample project

@joshcomley
Copy link
Contributor

This is marked as closed, but I have built the latest version of this plugin today and installed in VS Code, am using a shared project and the breakpoint still opens up the wrong file.

For example, in the following scenario, the breakpoint shows as hit on the correct line number but in the web version of the file:

app-home.component.ts < web version
app-home.component.tns.ts < NS version

Should this fix have addressed this issue? Or did I misunderstand it?

@joshcomley
Copy link
Contributor

Having looked at the code for the fix submitted for this, I could see the change required and made it as a pull request.

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

No branches or pull requests

5 participants