Closed i7soft closed 4 years ago
Hi @i7soft and thanks for reporting. Please try the following steps and let us know if it helps:
"cwd": "${workspaceFolder}/platform/mobileReactNative"
to the debug configuration you use in project/.vscode/launch.json
.Hi @i7soft . Do you have a chance to look at this?
@ruslan-bikkinin @SounD120 thank you for the help. I have upgraded to 0.11.0, but when I debug ios, I canot enter the breakpoint too. I can only see the debug information with "console.log". In andorid, the debug information with "console.log" is only displayed in LogCat.
@i7soft Have you tried to put breakpoints in other files except index.js
? Does debugging work there?
@SounD120 In ios, still can't debug, in index.js too, but I found that I can hit other breakpoints (the code for these breakpoints is executed after the app has run for a few minutes)
Hi @i7soft . Could you please share a demo application and indicate where you set breakpoints that don't work?
@SounD120 Ok, I will provide a demo and then record a video.
@SounD120 demo and the video are in :
Hi @i7soft . Could you please try to add debugger;
string at the top of your app.js file and let us know how it works for you?
@SounD120 After add debugger;
string at the top of app.js file, it can enter breakpoints in iOS,but still not work in Android
Hi @i7soft . I investigated the issue and proposed a fix for that. Could you please try it and let us know how it works for you? To do that please do the following:
fix-breakpoints-issue
branch: vscode-react-native-0.11.1.vsix.zipExtensions -> ... -> Install from VSIX...
and select downloaded VSIXHi @i7soft . I investigated the issue and proposed a fix for that. Could you please try it and let us know how it works for you? To do that please do the following:
- Download and unzip compiled extension VSIX from
fix-breakpoints-issue
branch: vscode-react-native-0.11.1.vsix.zip- Uninstall extension
- Close VS Code
- Open VS Code
- Click
Extensions -> ... -> Install from VSIX...
and select downloaded VSIX
i try this. ios can enter breakpoints,in android still not work
Hi @i7soft . As seen from your video in https://github.com/i7soft/reactNativeDemo repository, it looks like Remote JS Debug
is disabled on Android emulator. Could you please try to enable it and let us know how debugging works with new extension version?
To do that please do the following:
Debug Android
debug scenario and wait when application is builtadb shell input keyevent 82
command in terminal to open React Native developer menu inside the appRemote JS Debug
@SounD120 thanks,it is work!!!!!!!!!!
add debugger;
string at the top of app.js file is need
@i7soft Have you tried new extension version with a fix https://github.com/microsoft/vscode-react-native/issues/1081#issuecomment-533490551 ? It should work without debugger;
string at the top of App.js
file. Could you please try it and let us know how it works for you?
0.11.1
is work without debugger;
string @SounD120
🎉🎉🎉🎉🎉
@i7soft Glad to hear it. This fix will be released as a part of new extension version. We'll let you know when it comes out.
@SounD120 Thank you for your work~👍
Hi @i7soft. React Native Tools v0.12.0 with a fix for that has been released.
Folder structure
├ project ----├ .vscode --------├ launch.json --------├ settings.json ----├ platform --------├ mobileReactNative ☜ react native root ------------├ index.js
settings.json has set the react-native-toos.projectRoot like this:
./platform/mobileReactNative/index.js :
Actual Behavior
Expected Behavior
Software versions
Outputs (Include if relevant)
info Starting custom debugger by executing:, echo A debugger is not needed: "/Users/shiqiren/MC/NewBest/project/platform/mobileReactNative" BUNDLE [ios, dev] ./index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.
BUNDLE [ios, dev] ./index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.
MAP [ios, dev] ./index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.
nothing