user2065440
user2065440

Reputation: 31

Breakpoints not working in .tsx files

I trying to work with .tsx files inside ASP.NET VNext project. Created .tsx file, that executed without errors, but I can not set a breakpoint inside any method using Chrome. Mappings are exists, but the breakpoint is not working properly. Breakpoint works, but stops outside of method in which i sets breakpoint.

My test .tsx file: ///

interface IAppProps {
    text : String
}


interface IAppState {

}

class IndexPage extends React.Component<IAppProps, IAppState> {

constructor(props: any) {
    super(props);
}

getInitialState() {
    var a = 0;
}

render() {
    return (
        <h1>test</h1>
    );
}

}

For example, i sets up breakpoint on line "var a = 0;", but Chrome just ignores him and stopping on line: getInitialState(). And does not let me into the method body.

Upvotes: 1

Views: 599

Answers (1)

basarat
basarat

Reputation: 275857

but Chrome just ignores him and stopping on line: getInitialState(). And does not let me into the method body.

The ideal solution is to disable sourcemaps and just debug JavaScript. SourceMap support can be spotty. Thats just the (unspoken/ugly) truth of JavaScript developement.

Upvotes: 2

Related Questions