INNER CODE UNIT · TypeScript
getPortFromConfig
jasonjmcghee/claude-debugs-for-you · mcp/src/index.ts:10
function getPortFromConfig(): number {
try {
// Determine the global storage path based on platform
let storagePath: string;
const homeDir = os.homedir();
if (process.platform === 'darwin') {
storagePath = path.join(homeDir, 'Library', 'Application Support', 'Code', 'User', 'globalStorage', 'jasonmcghee.claude-debugs-for-you');
} else if (process.platform === 'win32') {
storagePath = path.join(homeDir, 'AppData', 'Roaming', 'Code', 'User', 'globalStorage', 'jasonmcghee.claude-debugs-for-you');
} else {
// Linux and others
storagePath = path.join(homeDir, '.config', 'Code', 'User', 'globalStorage', 'jasonmcghee.claude-debugs-for-you');
}
const configPath = path.join(storagePath, 'port-config.json');
if (fs.existsSync(configPath)) {