Vscode-react-native: Attempting to debug Expo SDK 23 Hello World app results in "Could not debug. Cannot read property 'haul' of undefined"

Created on 19 Nov 2017  路  7Comments  路  Source: microsoft/vscode-react-native

_From @sargant on November 19, 2017 12:25_

  • VSCode Version: Code 1.18.1 (929bacba01ef658b873545e26034d1a8067445e9, 2017-11-16T18:23:26.125Z)
  • OS Version: Darwin x64 17.2.0
  • Extensions:

Extension|Author (truncated)|Version
---|---|---
beautify|Hoo|1.1.1
vscode-docker|Pet|0.0.22
code-settings-sync|Sha|2.8.6
npm-intellisense|chr|1.3.0
path-intellisense|chr|1.4.2
vscode-eslint|dba|1.4.3
vscode-npm-script|eg2|0.3.3
file-icons|fil|1.0.7
node-debug2|ms-|1.19.0
vscode-react-native|vsm|0.5.5

(1 theme extensions excluded)


Steps to Reproduce:

  1. Create a new Expo app with exp init test-app
  2. Open in VSCode
  3. Debug > Add Configuration... > React Native
  4. Once launch.json is generated, select "Debug in Exponent" and press start

Debug console output shows:

OS: darwin x64
Adapter node: v7.9.0 x64
vscode-chrome-debug-core: 3.18.4
Starting debugger app worker.
Could not debug. Cannot read property 'haul' of undefined

The app QR code appears, the expo client on my device loads the javascript bundle from the packager, but eventually gets the red screen with "Runtime is not ready for debugging."


Reproduces without extensions: No (Configured debug type 'reactnative' is not supported)

_Copied from original issue: Microsoft/vscode#38715_

Most helpful comment

@sargant Hi, thanks for report. I see your issue and will provide a fix today. Meanwhile, as a quick workaround you can add empty "devDependencies": {} to your package.json.

All 7 comments

Additional information:

exp --version
46.0.3

package.json

{
  "main": "node_modules/expo/AppEntry.js",
  "private": true,
  "dependencies": {
    "expo": "^23.0.0",
    "react": "16.0.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-23.0.0.tar.gz"
  }
}

_From @weinand on November 19, 2017 20:54_

How does the launch config look like?

launch.json

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [

    {
      "name": "Debug Android",
      "program": "${workspaceRoot}/.vscode/launchReactNative.js",
      "type": "reactnative",
      "request": "launch",
      "platform": "android",
      "sourceMaps": true,
      "outDir": "${workspaceRoot}/.vscode/.react"
    },
    {
      "name": "Debug iOS",
      "program": "${workspaceRoot}/.vscode/launchReactNative.js",
      "type": "reactnative",
      "request": "launch",
      "platform": "ios",
      "sourceMaps": true,
      "outDir": "${workspaceRoot}/.vscode/.react"
    },
    {
      "name": "Attach to packager",
      "program": "${workspaceRoot}/.vscode/launchReactNative.js",
      "type": "reactnative",
      "request": "attach",
      "sourceMaps": true,
      "outDir": "${workspaceRoot}/.vscode/.react"
    },
    {
      "name": "Debug in Exponent",
      "program": "${workspaceRoot}/.vscode/launchReactNative.js",
      "type": "reactnative",
      "request": "launch",
      "platform": "exponent",
      "sourceMaps": true,
      "outDir": "${workspaceRoot}/.vscode/.react"
    }
  ]
}

_From @weinand on November 19, 2017 20:59_

Aha, you are using the reactnative debugger. Please move this issue to the reactnative repository. You can use this tool: https://github-issue-mover.appspot.com

@sargant Hi, thanks for report. I see your issue and will provide a fix today. Meanwhile, as a quick workaround you can add empty "devDependencies": {} to your package.json.

Provided fix in #602

Have been fixed in 0.5.6

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vladimir-kotikov picture vladimir-kotikov  路  5Comments

vsccarl picture vsccarl  路  3Comments

SounD120 picture SounD120  路  4Comments

AlexandreLouisnard picture AlexandreLouisnard  路  3Comments

kralcifer-ms picture kralcifer-ms  路  4Comments