microsoft / vscode-react-native

VSCode extension for React Native - supports debugging and editor integration
https://marketplace.visualstudio.com/items?itemName=vsmobile.vscode-react-native
Other
2.63k stars 267 forks source link

Debugger (for logging) does not exist anymore, only chrome works. #337

Closed nschurmann closed 7 years ago

nschurmann commented 8 years ago

Actual Behavior

  1. Unable to open debugger on iOS emulator
  2. write console.log to print variables, vscode doesn't have the debugger option available to debug. Only external browser (chrome) is working

Expected Behavior

  1. Run debugging in iOS emulator
  2. hitting shift+cmd+u open the debug console so i can check the logged variables.

Software versions

Outputs (Include if relevant)

MSLaguana commented 8 years ago

Can you please clarify what you mean by "Unable to open debugger on iOS emulator"? The debug console output you include above seems to indicate to me that we are connecting to your app and it is running code from it. Does something happen after that?

nschurmann commented 8 years ago

@MSLaguana when I write a console.log in my app, it won't show on the debugger that you mention, on an early version there was a debugger (i think something with adb reverse) that makes appear the console.log() in the debugger.

MSLaguana commented 8 years ago

The line Running application "myproyect" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF is printed by react-native using console.log, so I would expect your application to work.

Are you able to share some sample code that reproduces the issue?

nschurmann commented 8 years ago

sure, in a component, thunk, or whatever it wont print a console.log. IE:

 <TouchableHighlight
    underlayColor='#999'
    style={{backgroundColor: '#aaa'}}
    onPress={() => console.log('yay!')}
  >
    <Text >hello world</Text>
  </TouchableHighlight>

won't print yay!

MSLaguana commented 8 years ago

Does this happen for you even in a trivial application, e.g. adding that snippet to a freshly created react-native init project?

nschurmann commented 8 years ago

@MSLaguana this only happens when i try to run the debugger in vscode, if i run it on chrome it works.

MSLaguana commented 8 years ago

Hmm, I'm getting a different issue when I try to test this out myself. We'll have to investigate some more. Thanks for bringing this to our attention!

vladimir-kotikov commented 7 years ago

@nschurmann, is this still an issue for you? I just verified this with latest extension and react-native 0.39 and 0.42 versions and console logging seems to work just fine. I'm going to close this, but feel free to reopen if this is still a problem.