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

Chrome DevTools: console.trace() doesn't log call stack in Chrome's Console #1099

Closed
Natalia-Hristova opened this issue Mar 18, 2019 · 1 comment
Assignees
Milestone

Comments

@Natalia-Hristova
Copy link
Contributor

Environment

  • CLI: 5.3.0-2019-03-13-13021
  • Cross-platform modules:
  • iOS Runtime: tried 5.0.0, 5.1.0, 5.2.0, next

Describe the bug
console.trace() doesn't log call stack in Chrome's Console. The log is shown in Terminal's console.

To Reproduce

  1. tns create TestApp --ts
  2. Add console.trace();
  3. tns debug ios
  4. Open URL in Chrome and execute the code that calls console.trace();

Expected behavior
console.trace() to log call stack in Chrome's Console

Sample project

Additional context

@Natalia-Hristova
Copy link
Contributor Author

Natalia-Hristova commented Mar 20, 2019

Great - console.trace() is logged in Chrome console. However, Terminal's log is longer (looks like duplicated)

Terminal's log before the fix:

CONSOLE TRACE file:///app/main-view-model.js:29:22:
0: onTap(file:///app/main-view-model.js:29:22)
1: notify(file:///app/tns_modules/tns-core-modules/data/observable/observable.js:107:37)
2: _emit(file:///app/tns_modules/tns-core-modules/data/observable/observable.js:127:24)
3: tap(file:///app/tns_modules/tns-core-modules/ui/button/button.js:216:24)
4: UIApplicationMain([native code])
5: start(file:///app/tns_modules/tns-core-modules/application/application.js:275:26)
6: run(file:///app/tns_modules/tns-core-modules/application/application.js:303:10)
7: anonymous(file:///app/app.js:9:16)
8: evaluate([native code])
9: moduleEvaluation()
10: promiseReactionJob()
CONSOLE TRACE file:///app/main-view-model.js:30:22: HEEEEY
0: onTap(file:///app/main-view-model.js:30:22)
1: notify(file:///app/tns_modules/tns-core-modules/data/observable/observable.js:107:37)
2: _emit(file:///app/tns_modules/tns-core-modules/data/observable/observable.js:127:24)
3: tap(file:///app/tns_modules/tns-core-modules/ui/button/button.js:216:24)
4: UIApplicationMain([native code])
5: start(file:///app/tns_modules/tns-core-modules/application/application.js:275:26)
6: run(file:///app/tns_modules/tns-core-modules/application/application.js:303:10)
7: anonymous(file:///app/app.js:9:16)
8: evaluate([native code])
9: moduleEvaluation()
10: promiseReactionJob()

Terminal's log after the fix:

CONSOLE TRACE file:///app/main-view-model.js:29:22:
1   onTap@file:///app/main-view-model.js:29:22
2   notify@file:///app/tns_modules/tns-core-modules/data/observable/observable.js:107:37
3   _emit@file:///app/tns_modules/tns-core-modules/data/observable/observable.js:127:24
4   tap@file:///app/tns_modules/tns-core-modules/ui/button/button.js:216:24
5   UIApplicationMain@[native code]
6   start@file:///app/tns_modules/tns-core-modules/application/application.js:275:26
7   run@file:///app/tns_modules/tns-core-modules/application/application.js:303:10
8   anonymous@file:///app/app.js:9:16
9   evaluate@[native code]
10  moduleEvaluation@:1:11
11  promiseReactionJob@:1:11
0: onTap(file:///app/main-view-model.js:29:22)
1: notify(file:///app/tns_modules/tns-core-modules/data/observable/observable.js:107:37)
2: _emit(file:///app/tns_modules/tns-core-modules/data/observable/observable.js:127:24)
3: tap(file:///app/tns_modules/tns-core-modules/ui/button/button.js:216:24)
4: UIApplicationMain([native code])
5: start(file:///app/tns_modules/tns-core-modules/application/application.js:275:26)
6: run(file:///app/tns_modules/tns-core-modules/application/application.js:303:10)
7: anonymous(file:///app/app.js:9:16)
8: evaluate([native code])
9: moduleEvaluation()
10: promiseReactionJob()
CONSOLE TRACE file:///app/main-view-model.js:30:22: HEEEEY
1   onTap@file:///app/main-view-model.js:30:22
2   notify@file:///app/tns_modules/tns-core-modules/data/observable/observable.js:107:37
3   _emit@file:///app/tns_modules/tns-core-modules/data/observable/observable.js:127:24
4   tap@file:///app/tns_modules/tns-core-modules/ui/button/button.js:216:24
5   UIApplicationMain@[native code]
6   start@file:///app/tns_modules/tns-core-modules/application/application.js:275:26
7   run@file:///app/tns_modules/tns-core-modules/application/application.js:303:10
8   anonymous@file:///app/app.js:9:16
9   evaluate@[native code]
10  moduleEvaluation@:1:11
11  promiseReactionJob@:1:11
0: onTap(file:///app/main-view-model.js:30:22)
1: notify(file:///app/tns_modules/tns-core-modules/data/observable/observable.js:107:37)
2: _emit(file:///app/tns_modules/tns-core-modules/data/observable/observable.js:127:24)
3: tap(file:///app/tns_modules/tns-core-modules/ui/button/button.js:216:24)
4: UIApplicationMain([native code])
5: start(file:///app/tns_modules/tns-core-modules/application/application.js:275:26)
6: run(file:///app/tns_modules/tns-core-modules/application/application.js:303:10)
7: anonymous(file:///app/app.js:9:16)
8: evaluate([native code])
9: moduleEvaluation()
10: promiseReactionJob()

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

3 participants