Javascript调试? [英] Javascript debug ?

查看:55
本文介绍了Javascript调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。


我有一些javascript问题。在我的电脑上我

没有任何问题,脚本运行良好,但

有人告诉我,我的脚本在他的电脑上崩溃了。


为什么会发生这样的事情?


是否有可能激活调试模式以查看所有潜在错误?


我的一些脚本也是用PHP格式的!


非常感谢您的帮助。


问候


Otto

Hello to all

I have a problem with some javascript. On my computer I
don''t have any problem and the script work well, but
somebody told me that my script crash on his computer.

Why could something like that happen?

Are the a possibility to activate a debug mode to see all
the potential errors?

Some of my script are also in PHP!

Many thanks in advance for your help.

Regards

Otto

推荐答案

" Otto Haldi"写道:
"Otto Haldi" wrote:
我有一些JavaScript的问题。在我的电脑上我没有任何问题,脚本运行良好,但有人告诉我,我的脚本在他的电脑上崩溃了。
为什么会发生这样的事情?



可能只是一个不同的浏览器。

是否有可能激活调试模式以查看所有可能的错误?


基于Mozilla的浏览器(Firebird,Mozilla,Netscape)有一种调试形式的调试

模式。

只需键入javascript 的:"进入url栏后,它会比MSIE更容易列出所有错误



我的一些脚本也是用PHP编写的!


只要您的脚本通过支持PHP的服务器查看并且

正在运行,这不是问题,但我不是*想*有一种方法可以调试PHP(如果我错了就会非常感兴趣)。

非常感谢您的帮助。

奥托
I have a problem with some javascript. On my computer I
don''t have any problem and the script work well, but
somebody told me that my script crash on his computer.
Why could something like that happen?

could just be a different browser.
Are the a possibility to activate a debug mode to see all
the potential errors?
Mozilla based browsers (Firebird, Mozilla, Netscape) have a form of debug
mode.
Just type "javascript:" into the url bar, it will list all errors a bit more
comfortably than MSIE does.
Some of my script are also in PHP!
as long as your scripts are being viewed through a PHP capable server and
the are working, the are not the problem, but I don''t *think* there is a way
to debug PHP (would be very interested if I was wrong on that one).
Many thanks in advance for your help.

Regards

Otto



文章< bt ********** @ otis.netspace.net.au>," neerolyte"

< ne ******* @ netspace.nOsPaM.net.au>写道:
In article <bt**********@otis.netspace.net.au>, "neerolyte"
<ne*******@netspace.nOsPaM.net.au> writes:
我的一些脚本也是用PHP编写的!
Some of my script are also in PHP!



只要您的脚本正在使用通过支持PHP的服务器查看并且正在工作,这不是问题,但我不认为*有一种方法来调试PHP(如果我错了会很感兴趣在那一个)。



as long as your scripts are being viewed through a PHP capable server and
the are working, the are not the problem, but I don''t *think* there is a way
to debug PHP (would be very interested if I was wrong on that one).




PHP和javascript一样容易调试。如果出现错误,PHP会告诉你/ b $ b你用什么行和什么字符(就像IE用javascript做的那样)。你只需要
就必须使用一个编辑器来告诉你行号。


至于用于PHP的Venkman类型调试器,从未见过一个并且会是as

对你感兴趣。

-

兰迪



PHP is as easy to debug as javascript is. If there is an error, PHP will tell
you what line and what character (much as IE does with javascript). You just
have to use an editor that tells you the line numbers.

As for a Venkman type debugger for PHP, have never seen one and would be as
interested as you are.
--
Randy


Otto Haldi写道:
Otto Haldi wrote:
大家好!

我有一些javascript的问题。在我的电脑上我没有任何问题,脚本运行良好,但有人告诉我,我的脚本在他的电脑上崩溃了。

为什么会这样的话发生了什么?

是否有可能激活调试模式以查看所有可能的错误?

我的一些脚本也在PHP中!

非常感谢您的帮助。

问候

奥托
Hello to all

I have a problem with some javascript. On my computer I
don''t have any problem and the script work well, but
somebody told me that my script crash on his computer.

Why could something like that happen?

Are the a possibility to activate a debug mode to see all
the potential errors?

Some of my script are also in PHP!

Many thanks in advance for your help.

Regards

Otto




测试时网站,你需要尽可能多的浏览器

组合...有几个因素可以改变

你的页面/脚本的管理方式(在有意义的顺序):


1.浏览器(IE,Mozilla / Netscape,Opera,Safari,Konqurer等)

2.浏览器版本( 3.0,4.01,5.5,6.0等)

3.操作系统(Windows XP / 2000 / ME / 98/95,Mac 9 / X,Linux,

$ BS $ b屏幕尺寸和分辨率(更重要的是FreeBSD,Solaris,Irix等)对于HTML的外观)

5.运行它的机器的处理速度。 (如果您的脚本中存在时间问题(竞争条件),这实际上只是

的情况)


最好的办法是安装尽可能多的浏览器你可以自己使用

系统,当它完成后,让所有人参与测试它们的系统




当问题发生时,请务必获取有关

用户设置的所有信息,以便您可以尝试复制它。


Brian



When testing your site, you need to do it with as many browser
combinations as possible... There are several factors that can change
the way your page/script are managed (In order of significance):

1. The Browser (IE, Mozilla/Netscape, Opera, Safari, Konqurer, etc)
2. The Browser Version (3.0, 4.01, 5.5, 6.0, etc)
3. The Operating System (Windows XP/2000/ME/98/95, Mac 9/X, Linux,
FreeBSD, Solaris, Irix, etc)
4. The Screen size and resolution (More important for appearance of HTML)
5. The process speed of the machine it runs on. (This is really only the
case if you have timing issues (race conditions) in your script)

The best bet, is to install as many browsers as you can on your own
systems, and when it is all done, have everyone involved test it on
their systems.

When a problem happens, make sure to get all of the information about
the user''s setup, so you can try to replicate it.

Brian


这篇关于Javascript调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆