React native cannot be debugged in a subdirectory #1081
Closed
Description
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:
{
"react-native-tools":{
"projectRoot":"./platform/mobileReactNative"
},
"react-native-tools.projectRoot": "./platform/mobileReactNative"
}
./platform/mobileReactNative/index.js :
var ReactNative=require('react-native');
console.log('hello bobo');
var AppRegistry=ReactNative.AppRegistry;
import Loader from './Loader';
import {name as appName} from './app.json';
AppRegistry.registerComponent(appName, ()=>Loader);
Actual Behavior
- Cannot enter breakpoints during debugging
Expected Behavior
Software versions
- React-Native VS Code extension version: 0.10.2
- VSCode version: 1.37.1
- OS platform and version: Mac 10.14.6
- NodeJS version: 10.11.0
- React Native version: 0.60
- Expo SDK version (include if relevant):
Outputs (Include if relevant)
- Output of the Debug Console (View -> Toggle Debug Console):
Invalidating <RCTCxxBridge: 0x7f8a40d4b300> (parent: <RCTBridge: 0x6040000d6b90>, executor: RCTWebSocketExecutor)
RCTLog.js:47
调试器辅助进程在端口 32500 上已加载运行时
hello bobo
index.bundle:1004
Running application mobileReactNative ({
initialProps = {
};
rootTag = 31;
})
RCTLog.js:47
Running application "mobileReactNative" with appParams: {"rootTag":31,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
infoLog.js:16
- Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):
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.
- Output of the Developer Tools console (Help -> Toggle Developer Tools -> Select Console tab):
nothing