HowardCole This should happen automatically if you generate a source map when transpiling your ts files. It will map lines (and column numbers if you use eval-source-map) to the typescript files.
You can find general configuration if you use webpack here: https://webpack.js.org/guides/typescript/
Be advised though that there's a small issue with typescript/vue source mapping as chrome and visual studio use different biases for breakpoints. It's a bit stupid, but I haven't managed to fix that and resort to using Chrome in those select cases.
Edit: Completely forgot, but to get them running without issues where vue (and possibly ts) files land in different pack directories than normal javascript files (and the internally generated checksum files), I had to trick around a bit.
webpack.config.js
if (!Encore.isProduction()) {
module.exports.devtool = 'eval-source-map';
module.exports.output.devtoolFallbackModuleFilenameTemplate = 'webpack-fallback:///[resource-path]?[hash]';
module.exports.output.devtoolModuleFilenameTemplate = info => {
const isVue = info.resourcePath.match(/\.vue$/);
const startsWithDot = info.resourcePath.startsWith("./");
if (isVue) {
if (startsWithDot) {
return `webpack-generated:///${info.resourcePath}?${info.hash}`
}
else
return `webpack:///./${info.resourcePath}`;
}
return `webpack:///${info.resourcePath}`;
}
}```