ionic-team / vscode-ionic

Visual Studio Code Ionic Extension
Other
11 stars 1 forks source link

Unbound breakpoint when using Ionic extension in VSCode #216

Closed bengrah-miller closed 2 weeks ago

bengrah-miller commented 2 weeks ago

Hi guys,

I'm using the Ionic extension in VSCode, specifically using the 'Debug' option to connect to my app on my device. It looks like I'm able to connect to the device, but when I try to set a breakpoint, I get the following:

image

It does mention about 'troubleshooting your launch configuration' but it looks like there isn't anything like the previous launch.json file that there was with Cordova.

Any ideas?

Thanks, bengrah.

dtarnawsky commented 2 weeks ago

Are you trying to debug a production build? Source maps need to be enabled which will typically be configured for a development build. Are you using React, Vue, JS, Angular? Are you using the Ionic framework? Can you provide a reproduction project?

bengrah-miller commented 2 weeks ago

Hi @dtarnawsky ,

It's an Ionic Capacitor project. Where do you configure the source maps setting?

Ben.

dtarnawsky commented 2 weeks ago

That depends on the questions I asked. For example, in Angular, the sourceMap property is found in angular.json.

bengrah-miller commented 2 weeks ago

Hi @dtarnawsky I do have sourceMap configured under the development configuration, and I've just added it to production configuration:

image

I'm able to get breakpoints now - thanks for your help.

bengrah.