Repository: microsoft/vscode-react-native

Issue #328: Can't add breakpoint, source maps issue?
Created: 2016-10-26T15:47:17Z
Actual Behavior

I run the Debug iOS command from the debugger panel
Everything appears to load correctly into the Simulator and I'm able to compile my ts properly resulting in changes in the Simulator
I click to add a breakpoint to index.ios.tsx
Breakpoint appears grayed out and when I hover I see this message:
"Breakpoint ignored because generated source code not found (source map problem?)"


Expected Behavior

I run the Debug iOS command from the debugger panel
Everything appears to load correctly into the Simulator and I'm able to compile my ts properly resulting in changes in the Simulator
I click to add a breakpoint to index.ios.tsx
Breakpoint is added and I'm able to refresh the simulator and see it catch

Software versions

React-Native VS Code extension version: 0.2.1
VSCode version: 1.6.1
OS platform and version: Mac OS Sierra v10.12.1
React Native version: 0.32.1

Outputs (Include if relevant)

Output of the Debug Console (View -> Toggle Debug Console):
[vscode-react-native] Starting React Native Packager.
[vscode-react-native] Prewarming bundle cache. This may take a while ...
[vscode-react-native] Building and running application.
[vscode-react-native] Executing command: react-native run-ios --simulator iPhone 5s --project-path ios
Found Xcode project TypescriptTest3.xcodeproj
Launching iPhone 5s (10.0)...
Building using "xcodebuild -project TypescriptTest3.xcodeproj -scheme TypescriptTest3 -destination id=E3F427C1-5B10-45B9-AE0E-313C6E72965F -derivedDataPath build"
User defaults from command line:
IDEDerivedDataPathOverride = /Users/davidhelmer/Work/React Native/TypescriptTest4/ios/build
=== BUILD TARGET RCTVibration OF PROJECT RCTVibration WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET RCTGeolocation OF PROJECT RCTGeolocation WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET RCTLinking OF PROJECT RCTLinking WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET React OF PROJECT React WITH CONFIGURATION Debug ===
Check dependencies
PhaseScriptExecution Run\ Script /Users/davidhelmer/Work/React\ Native/TypescriptTest4/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Script-006B79A01A781F38006873D1.sh
cd "/Users/davidhelmer/Work/React Native/TypescriptTest4/node_modules/react-native/React"
export ACTION=build
export AD_HOC_CODE_SIGNING_ALLOWED=NO
export ALTERNATE_GROUP=staff
export ALTERNATE_MODE=u+w,go-w,a+rX
export ALTERNATE_OWNER=davidhelmer
export ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
export ALWAYS_SEARCH_USER_PATHS=NO
export ALWAYS_USE_SEPARATE_HEADERMAPS=NO
export APPLE_INTERNAL_DEVELOPER_DIR=/AppleInternal/Developer
export APPLE_INTERNAL_DIR=/AppleInternal
export APPLE_INTERNAL_DOCUMENTATION_DIR=/AppleInternal/Documentation
export APPLE_INTERNAL_LIBRARY_DIR=/AppleInternal/Library
export APPLE_INTERNAL_TOOLS=/AppleInternal/Developer/Tools
export APPLICATION_EXTENSION_API_ONLY=NO
export APPLY_RULES_IN_COPY_FILES=NO
export ARCHS=x86_64
export ARCHS_STANDARD="i386 x86_64"
export ARCHS_STANDARD_32_64_BIT="i386 x86_64"
export ARCHS_STANDARD_32_BIT=i386
export ARCHS_STANDARD_64_BIT=x86_64
export ARCHS_STANDARD_INCLUDING_64_BIT="i386 x86_64"
export ARCHS_UNIVERSAL_IPHONE_OS="i386 x86_64"
Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):
Getting exponent dependecy.
Dependency not present. Installing it...
######### Checking react native is correctly setup. This may take a while... ##########
Checking if the correct react native is installed..
######### Starting Packager ##########
######### Executing command: react-native start --port 8081 ##########
..Scanning 647 folders for symlinks in /Users/davidhelmer/Work/React Native/TypescriptTest4/node_modules (21ms)
┌────────────────────────────────────────────────────────────────────────────┐
│  Running packager on port 8081.                                            │
│                                                                            │
│  Keep this packager running while developing on any JS projects. Feel      │
│  free to close this tab and run your own packager instance if you          │
│  prefer.                                                                   │
│                                                                            │
│  https://github.com/facebook/react-native                                  │
│                                                                            │
└────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
/Users/davidhelmer/Work/React Native/TypescriptTest4

.[11:35:12 AM]  Building Dependency Graph
[11:35:12 AM]  Crawling File System
[Hot Module Replacement] Server listening on /hot
React packager ready.
[11:35:12 AM]    Crawling File System (443ms)
[11:35:12 AM]  Building in-memory fs for JavaScript
[11:35:13 AM]    Building in-memory fs for JavaScript (508ms)
[11:35:13 AM]  Building in-memory fs for Assets
[11:35:13 AM]    Building in-memory fs for Assets (413ms)
[11:35:13 AM]  Building Haste Map
.[11:35:13 AM]  Building (deprecated) Asset Map
[11:35:14 AM]    Building (deprecated) Asset Map (167ms)
[11:35:14 AM]    Building Haste Map (458ms)
[11:35:14 AM]    Building Dependency Graph (1874ms)
### Packager started.
[11:35:14 AM]  request:/index.ios.bundle?platform=ios
[11:35:14 AM]  find dependencies
...................[11:35:42 AM]  request:/build/index.ios.bundle?platform=ios&dev=true&minify=false
[11:35:42 AM]  find dependencies
Starting custom debugger by executing: echo A debugger is not needed:  "/Users/davidhelmer/Work/React Native/TypescriptTest4"
[11:35:43 AM]  request:/build/index.ios.bundle?platform=ios&dev=true&minify=false
.[11:35:44 AM]    find dependencies (1970ms)
[11:35:44 AM]    request:/build/index.ios.bundle?platform=ios&dev=true&minify=false (2184ms)
[11:35:44 AM]    request:/build/index.ios.bundle?platform=ios&dev=true&minify=false (1068ms)
.........[11:36:04 AM]  request:/build/index.ios.bundle?platform=ios&dev=true&minify=false
[11:36:04 AM]    request:/build/index.ios.bundle?platform=ios&dev=true&minify=false (24ms)
Starting custom debugger by executing: echo A debugger is not needed:  "/Users/davidhelmer/Work/React Native/TypescriptTest4"
......######### Stopping Packager ##########
### Packager stopped
### Checking react native is correctly setup. This may take a while...
Checking if the correct react native is installed..
### Starting Packager
### Executing command: react-native start --port 8081
Scanning 647 folders for symlinks in /Users/davidhelmer/Work/React Native/TypescriptTest4/node_modules (38ms)
┌────────────────────────────────────────────────────────────────────────────┐
│  Running packager on port 8081.                                            │
│                                                                            │
│  Keep this packager running while developing on any JS projects. Feel      │
│  free to close this tab and run your own packager instance if you          │
│  prefer.                                                                   │
│                                                                            │
│  https://github.com/facebook/react-native                                  │
│                                                                            │
└────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
/Users/davidhelmer/Work/React Native/TypescriptTest4
[11:44:40 AM]  Building Dependency Graph
[11:44:40 AM]  Crawling File System
[Hot Module Replacement] Server listening on /hot
React packager ready.
[11:44:40 AM]    Crawling File System (284ms)
[11:44:40 AM]  Building in-memory fs for JavaScript
[11:44:40 AM]    Building in-memory fs for JavaScript (251ms)
[11:44:40 AM]  Building in-memory fs for Assets
[11:44:41 AM]    Building in-memory fs for Assets (201ms)
[11:44:41 AM]  Building Haste Map
[11:44:41 AM]  Building (deprecated) Asset Map
[11:44:41 AM]    Building (deprecated) Asset Map (84ms)
### Packager started.
[11:44:41 AM]    Building Haste Map (278ms)
[11:44:41 AM]    Building Dependency Graph (1024ms)
[11:44:41 AM]  request:/index.ios.bundle?platform=ios
[11:44:41 AM]  find dependencies
[11:44:59 AM]  request:/build/index.ios.bundle?platform=ios&dev=true&minify=false
[11:44:59 AM]  find dependencies
Starting custom debugger by executing: echo A debugger is not needed:  "/Users/davidhelmer/Work/React Native/TypescriptTest4"
[11:45:00 AM]  request:/build/index.ios.bundle?platform=ios&dev=true&minify=false
[11:45:00 AM]    find dependencies (1796ms)
[11:45:00 AM]    request:/build/index.ios.bundle?platform=ios&dev=true&minify=false (1926ms)
[11:45:00 AM]    request:/build/index.ios.bundle?platform=ios&dev=true&minify=false (761ms)
[11:45:01 AM]  request:/build/index.ios.bundle?platform=ios&dev=true&minify=false
[11:45:01 AM]    request:/build/index.ios.bundle?platform=ios&dev=true&minify=false (15ms)
[11:45:01 AM]  request:/build/index.ios.map?platform=ios&dev=true&minify=false
[11:45:01 AM]    request:/build/index.ios.map?platform=ios&dev=true&minify=false (59ms)
[11:45:22 AM]  request:/build/index.ios.bundle?platform=ios&dev=true&minify=false
[11:45:22 AM]    request:/build/index.ios.bundle?platform=ios&dev=true&minify=false (14ms)
Starting custom debugger by executing: echo A debugger is not needed:  "/Users/davidhelmer/Work/React Native/TypescriptTest4"
[11:45:22 AM]  request:/build/index.ios.bundle?platform=ios&dev=true&minify=false
[11:45:22 AM]    request:/build/index.ios.bundle?platform=ios&dev=true&minify=false (11ms)
[11:45:22 AM]  request:/build/index.ios.map?platform=ios&dev=true&minify=false
[11:45:22 AM]    request:/build/index.ios.map?platform=ios&dev=true&minify=false (57ms)

Output of the Developer Tools console (Help -> Toggle Developer Tools -> Select Console tab):

Duplicate issue #438: Breakpoints not hit in typescript files
Created: 2017-04-16T22:41:46Z
Actual Behavior

I have created a fresh react-native project (react-native init my_project)
I have added a tsconfig.json and enable sourcemap (I have tried also inlineSourceMap:true with no solution)
I have added a simple .tsx file compiled into the output directory and referenced and rendered in the index.android.js entry file. Then I have set a breakpoint in the componentDidMount method. Breakpoint is never hit but appears grayed out with message: breakpoint ignored because generated code not found. (I have looked at several similar issues at stackoverflow as well as here at github).

Expected Behavior

Breakpoints should be hit

Software versions

React-Native VS Code extension version: 0.3.2
VSCode version: 1.9.1
OS platform and version: windows 8.1
NodeJS version: v6.9.2
React Native version: 0.41.2

Closing comment (2017-06-08T07:21:18Z): This is a duplicate of #328, please take a look at the conversation there to find a suitable workaround