initial support for debugging. Later ill moved to JavaScript plugin, after rewrite it