Results 1 to 2 of 2

Thread: debug run-time created function

  1. #1
    Join Date
    Apr 2012

    debug run-time created function

    I need to create a function from a given string.
    Is there any way to debug a run-time created function in browser?

    var strFunction = " return 'hello'; ";

    //here I get an anonymous function can I give a name to it?
    var fn = new Function(strFunction);

    //browser debugger wont step into the function body, can I do that somehow?
    var result = fn();

  2. #2
    Join Date
    Apr 2010
    Oslo, Norway
    You are free to use things like console.log in your anonymous function....No help there?
    - Spinner
    Producer, Developer, Gamer, Father and Husband.

    Spinners Web-development blog

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center