Skip to content

Unable to debug JS in playground on main branch #13545

@Yajur-Grover

Description

@Yajur-Grover

Problem Description

Facing a similar issue as described in #13543, however this is occurring in main (which is currently on [email protected]). Hit this issue when trying to debug a TextInput to investigate #13515. I am not able to hit any of the breakpoints that I have set within the Javascript app code. This issue was also repro'd on a separate machine with the same dependencies.

Steps To Reproduce

  1. Insert code sample from below into simple.tsx in playground
  2. Set a breakpoint within one of the event handlers
  3. Launch playground and interact with the component to trigger handler
  4. Breakpoint is not triggered

Expected Results

Breakpoint should be hit.

CLI version

npx react-native -v

Environment

npx react-native info

Community Modules

No response

Target Platform Version

None

Target Device(s)

No response

Visual Studio Version

Visual Studio 2022

Build Configuration

Debug

Snack, code example, screenshot, or link to a repository

import React from 'react';
import {AppRegistry, TextInput, View} from 'react-native';

export const Bootstrap: React.FunctionComponent<{}> = () => {
  const [text, onChangeText] = React.useState('Useless Text');

  return (
    <View
      accessible={true}>
      <TextInput
        onChangeText={onChangeText}
        value={text}
        onChange={() => {
          console.log('onChange activated')
        }}
        onKeyPress={(e) => {console.log(e.nativeEvent)}}
      />
    </View>
    );
}

AppRegistry.registerComponent('Bootstrap', () => Bootstrap);
 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions