Skip to content

Unable to debug global scripts #6166

Closed
Closed
@franktroia

Description

@franktroia

Bug Report or Feature Request (mark with an x)

- [ x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.0.0-rc.1
node: 6.10.0
os: win32 x64
@angular/common: 2.4.10
@angular/compiler: 2.4.10
@angular/core: 2.4.10
@angular/forms: 2.4.10
@angular/http: 2.4.10
@angular/platform-browser: 2.4.10
@angular/platform-browser-dynamic: 2.4.10
@angular/router: 3.4.10
@angular/upgrade: 2.4.10
@angular/cli: 1.0.0-rc.1
@angular/compiler-cli: 2.4.10

Repro steps.

  1. Add a global script to .angular-cli.json
  2. Start with ng serve
  3. Use your favorite browser's dev tools and attempt to set a break point in your global script.

I can search for the script, but instead of finding the scripts source code, I find webpackified script.

module.exports = "'use strict';  <snipped>"

//////////////////
// WEBPACK FOOTER
// ./~/raw-loader!./~/source-map-loader!./app/src/app.js
// module id = 875
// module chunks = 0

The log given by the failure.

N/A

Desired functionality.

I should be able to search directly for the script and set a break point. As of now, the only way to set a break point in a global script is to modify the source and add a debugger; statement and reload.

This is a hybrid app where I'm loading the existing AngularJS JS code using global scripts, so being able to debug these scripts easily is desired.

I appreciate any help!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions