Search the Community
Showing results for tags 'debug'.
I recently revisited the console object, available in all browsers, and discovered some newbies I didn't know about. The methods and properties below may be sometimes useful for debugging purposes. The console object is tied to the global window object, so access either by browserapi.window.console.log('whatever'); or define a reference to the window object : var window external 'window': variant; and call like window.console.dirxml(self); Some console methods are wrapped in SmartCL.System (like writeln ea) and SmartCL.Console The console.dirxml() above gives an xm
Every now and then (not often) it is worthwhile to check what a compiled function actually looks like. An easy way to do that is to use the toString method function test(a:string): string; begin result := 'Da'+a; end; Procedure TForm1.ListProc; begin console.log(test('da')); //"Dada" asm console.log( (@test).toString() ); end; //lists compiled external function 'test' asm console.log( (this.ListProc).toString() ); end; //lists compiled procedure TForm1.ListProc asm console.log( (this.@InitializeForm).toString() ); e