Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2016
    Posts
    87
    Thanks
    4
    Thanked 0 Times in 0 Posts

    index.php not showing in Chrome console

    The main file for my website is index.php. This doesn't show in the console in Chrome. That's annoying - I want to use the console to debug my project. The file shows up OK in IE's debugger and in Firefox. Why the problems with Chrome, and can I do anything about it?

    Thanks

  2. #2
    Senior Coder deathshadow's Avatar
    Join Date
    Feb 2016
    Location
    Keene, NH
    Posts
    3,605
    Thanks
    5
    Thanked 521 Times in 508 Posts
    Since the console is for scripting OUTPUT, do you HAVE scripting? What is there for the console to output? Assuming your scripting is well written with isolated scope, what would the console be used to manipulate? (if you mean typing in commands from it, something I didn't even know was a thing until recently)

    Do you mean the document inspector? "console" doesn't make much sense in this context.

    Can you provide us a sample of the page -- and more importantly, WHAT are you actually trying to do to / on said page that would even make sense to be screwing around with in that manner?

    Are you magically expecting to see your PHP code on the client-side browser or something equally nonsensical?
    Last edited by deathshadow; Aug 14th, 2019 at 07:23 PM.
    “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.” – C.A.R. Hoare, The 1980 ACM Turing Award Lecture
    http://www.cutcodedown.com

  3. #3
    New Coder
    Join Date
    Jul 2016
    Posts
    87
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by deathshadow View Post
    Since the console is for scripting OUTPUT, do you HAVE scripting? What is there for the console to output? Assuming your scripting is well written with isolated scope, what would the console be used to manipulate? (if you mean typing in commands from it, something I didn't even know was a thing until recently)

    Do you mean the document inspector? "console" doesn't make much sense in this context.

    Can you provide us a sample of the page -- and more importantly, WHAT are you actually trying to do to / on said page that would even make sense to be screwing around with in that manner?

    Are you magically expecting to see your PHP code on the client-side browser or something equally nonsensical?
    Sorry, I didn't explain myself very well. It's not the console, I guess it is the document inspector. It's where you go into Developer Tools and then Sources.

    I don't expect the php code to appear there but I do expect the rest of the file (which is mostly javascript) to appear. It does appear in the Debugger of Internet Explorer after all.

    What I want to be doing is debug my code. I have a duplicate of my site where I do this. Given that the file contains php I understand that my two choices are to use XAMP (I forget the exact name) and do it on my PC or to have this duplicate site. Does that not make sense?

    Actually I have found that all I need to do is refresh the site after I open the document inspector, and the code appears. Better if I didn't have to do that, but I suppose I can live with it.

  4. #4
    Senior Coder deathshadow's Avatar
    Join Date
    Feb 2016
    Location
    Keene, NH
    Posts
    3,605
    Thanks
    5
    Thanked 521 Times in 508 Posts
    If it only appears after a refresh when the page is loaded, that likely means most if not all of your document, content, and structure is being loaded via JavaScript... this is a bad thing...

    Since you're telling users who browse with scripting blocked or restricted to go perform an anatomically impossible act upon themselves.

    It makes me VERY curious what you're building, as generally this type of behavior in the document inspector is a sign of horrifically BAD coding practices and an over-use of JavaScript in a way that's an accessibility violation.
    “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.” – C.A.R. Hoare, The 1980 ACM Turing Award Lecture
    http://www.cutcodedown.com


 

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
  •