Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Breakpoints not being hit with browser inspect for USB connected device

Member
Joined
Feb 3, 2023
Messages
131
While debugging my ionic capacitor application on the USB connected device, my browser dev-tools (Chrome, Edge, Firefox) is not hitting my breakpoints (debuggers in source code).
When I run it on ionic serve there is no problem.
I am not sure if it has to do anything with the source-map or symbols not being loaded.
Here is the warning massage in android studio: "Attention! No symbol directories found - please check your native debug configuration".
I searched every related issue on source-maps but none of them were helpful because in most of those cases they are not loaded completely which is not the case here. Also, last related issues where 2 years ago and angular-devtools are changed.
 
New member
Joined
Feb 14, 2023
Messages
7
It sounds like your issue could be related to the source maps not being properly configured for debugging on the USB connected device. When you run your app using ionic serve, the source maps are generated and served automatically, but when you debug on a USB connected device, you may need to configure the source maps manually.
Here are some steps you can try to ensure that your source maps are properly configured for debugging on the USB connected device:
  1. Check that the source maps are being generated by running ionic build --prod --source-map in your terminal.
  2. Make sure that the devtool property in your webpack configuration is set to 'source-map'. If you're not using webpack, check the documentation for your build tool to ensure that source maps are being generated.
  3. Ensure that your device is set up for debugging. You may need to enable USB debugging and install device drivers on your computer. Check the documentation for your device to find out how to enable USB debugging.
  4. Check that your browser dev-tools is properly attached to the USB connected device. In Chrome, you can do this by opening DevTools, clicking the three dots in the top right corner, and selecting "More tools" > "Remote devices". From there, you should be able to select your device and inspect it remotely.
  5. Finally, check the configuration of your Android Studio's native debugger. It's possible that the debugger is not configured to look in the right place for symbols. Try setting the symbol directories to the appropriate paths in your build configuration.
Hopefully, one or more of these steps will help you debug your application on the USB connected device.
 
Top